__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/45239711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void substringInPlace(int beginIndex, int endIndex) {
hashCode = null;
if((beginIndex < 0) ||
(endIndex < beginIndex) ||
(endIndex > length())) {
// Throw out of bounds exception
throw new IndexOutOfBoundsException();
}
b.limit(b.position() + endIndex);
b.position(b.position() + beginIndex);
}
COM: <s> converts this binary string to the specified substring in place to save memory </s>
|
funcom_train/25099356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addVolatileMemoryPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Node_volatileMemory_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Node_volatileMemory_feature", "_UI_Node_type"),
HardwaremodelingPackage.Literals.NODE__VOLATILE_MEMORY,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the volatile memory feature </s>
|
funcom_train/50093289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IMolecule getMolecule2()throws Exception {
IMolecule molecule = builder.newMolecule();
molecule.addAtom(builder.newAtom("C"));
molecule.addAtom(builder.newAtom("O"));
molecule.getAtom(1).setFormalCharge(1);
molecule.addBond(0, 1, IBond.Order.DOUBLE);
addExplicitHydrogens(molecule);
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule);
LonePairElectronChecker lpcheck = new LonePairElectronChecker();
lpcheck.saturate(molecule);
return molecule;
}
COM: <s> get the molecule 2 c o h </s>
|
funcom_train/41024424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disposeCapture() {
// Check if capturing is started.
if (!isStarted()) {
return;
}
// Stop capturing.
player.stop();
player.close();
player = null;
grabber = null;
// Check the device as unused.
CaptureDeviceInfo[] devices = queryDevices();
for (int i = 0; i < deviceInUse.length; i ++) {
if (locator.toExternalForm()
.equals(devices[i].getLocator().toExternalForm())) {
deviceInUse[i] = false;
break;
}
}
}
COM: <s> dispose player object </s>
|
funcom_train/48902561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FreeMindWriter richText( String text ) {
tagClose();
out.println( "<richcontent TYPE='NODE'><html>\n <head>\n\n </head>\n <body>" );
out.println( text );
out.println( " </body>\n</html>\n</richcontent>" );
return this;
}
COM: <s> write an html text element this will close the opening node tag </s>
|
funcom_train/8409150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (iToString == null) {
String shortName = ClassUtils.getShortClassName(getEnumClass());
iToString = shortName + "[" + getName() + "=" + getValue() + "]";
}
return iToString;
}
COM: <s> p human readable description of this code enum code item </s>
|
funcom_train/2576442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLabel(String label) {
String existing = this.label;
if (existing != null) {
if (!existing.equals(label)) {
this.label = label;
fireChangeEvent();
}
}
else {
if (label != null) {
this.label = label;
fireChangeEvent();
}
}
}
COM: <s> sets the label for the axis and sends an </s>
|
funcom_train/47886595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initGUI() {
try {
createMainWindow();
new objects(this);
new tuxPanel(this);
new advancedViewPanel(this);
new levelPanel(this);
new ledPanel(this);
new controlPanel(this);
new ttsPanel(this);
new generalControlPanel(this);
}
catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> load the gui components and place them in the right place </s>
|
funcom_train/133066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deselect(List<GlyphI> glyphs) {
// need to special case if glyphs argument is ref to same List as selected,
// since the deselect(Object) will cause shrinking of vec size as
// it is being looped through
if (glyphs == null) {
return;
}
if (glyphs == selected) {
clearSelected();
}
for (int i=0; i<glyphs.size(); i++) {
deselect(glyphs.get(i));
}
}
COM: <s> removes all glyphs in list code glyphs code from the list of selected </s>
|
funcom_train/25342853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGenerateMinimizeArtistRepeats(boolean minimize) {
this.ensureLocalDataExists();
boolean old = this.localData.isGenerateMinimizeArtistRepeats();
this.localData.setGenerateMinimizeArtistRepeats(minimize);
this.firePropertyChange("generateMinimizeArtistRepeats", old, minimize);
}
COM: <s> specifies whether or not repeating of artists shall be minimized </s>
|
funcom_train/4558935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNewEmail(Boolean isNew) {
if (isNew) {
Date now = new Date();
String newOriginEmail;
newOriginEmail = "test" + u.dataTime2String(now, "ddMMyyyyHHmmss")+ "@mail.com";
testEmail = newOriginEmail;
return newOriginEmail;
} else {
return (testEmail == null ? getNewEmail(true) : testEmail);
}
}
COM: <s> function create new trivial original email </s>
|
funcom_train/45319155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCompatibleForEquals(Class<?> otherClass) {
if (!equalsParentClass.isAssignableFrom(otherClass)) {
return false;
}
else {
if (subclassCannotOverrideEquals) {
return true;
}
else {
return equalsParentClass.equals(forClass(otherClass).equalsParentClass);
}
}
}
COM: <s> whether instances of </s>
|
funcom_train/1440702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddLogData() throws Exception {
System.out.println("addLogData");
LogData data = new LogData();
Server server = new Server();
ServerDataContainer container = new ServerDataContainerImpl();
ServerDataListenerImpl instance = new ServerDataListenerImpl(server);
instance.setServerDataContainer(container);
instance.addLogData(data);
assertTrue(container.getLogData().contains(data));
}
COM: <s> test of add log data method of class server data listener impl </s>
|
funcom_train/46727704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeView(IControlNode control) throws Exception {
// Prompt for confirmation
if (PromptsController.questionIsOKCancelOK(getFrame(), LangReference.PRESSOKTOREMOVEVIEWFROMPANEL, LangReference.REMOVEVIEWFROMPANEL)) {
// Set the view id to 0 on the panel
ApplicationPanelModel panel = SecurityService.getApplicationPanel(control.getId());
panel.setApplicationViewId(0L);
SecurityService.store(panel);
}
}
COM: <s> remove the panels view </s>
|
funcom_train/42509884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addObject(Group homeRoot, Selectable homeObject, boolean waitForLoading) {
Object3DBranch object3D = createObject3D(homeObject, waitForLoading);
this.homeObjects.put(homeObject, object3D);
homeRoot.addChild(object3D);
clearPrintedImageCache();
}
COM: <s> adds to code home root code a wall branch matching code wall code </s>
|
funcom_train/37586863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void compileStarted() {
// new ScrollableDialog(null, "CompilerEventNotifier.compileStarted() called for listeners " + _listeners, "", "").show();
_lock.startRead();
try { for (CompilerListener cl : _listeners) { cl.compileStarted(); } }
finally { _lock.endRead(); }
}
COM: <s> called after a compile is started by the global model </s>
|
funcom_train/43410984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initComponents() {
// window that will contains all visual content
wdJanela = new Window();
wdJanela.setIsModal(true);
wdJanela.setShowModalMask(true);
wdJanela.setHeight(250);
wdJanela.setWidth(300);
wdJanela.setCanDragResize(true);
wdJanela.setAutoCenter(true);
}
COM: <s> initializes widgets and other components </s>
|
funcom_train/44512081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateUser() {
JLabel userlabel = gui.getUserLabel();
userlabel.setText(user.getNick() + " "
+ getStatusString(user.getStatus()));
userlabel
.setIcon(new ImageIcon(GuiController.ICONPATH + "agent_24.png"));
userlabel.setHorizontalAlignment(JLabel.LEFT);
userlabel.setFont(getFont(FONT_BOLD));
if (user.isOffline()) {
userlabel.setForeground(GuiController.FGCOLOR);
}
gui.setUserLabel(userlabel);
gui.repaint();
}
COM: <s> updates the name and the status of the user in main gui </s>
|
funcom_train/10188393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add( E o ) {
int size = size();
Object tempData[] = new Object[size + 1];
if( size > 0 ) {
System.arraycopy( elementData, 0, tempData, 0, size );
}
elementData = (E[])tempData;
elementData[size] = o;
}
COM: <s> appends the specified element to the end of this list </s>
|
funcom_train/964596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetAverageCharacterWidthTestString() {
DefaultUnitConverter duc = DefaultUnitConverter.getInstance();
String customString = "Einen Vorsprung im Leben hat, " +
"wer da anpackt, " +
"wo die anderen erst einmal reden.";
duc.setAverageCharacterWidthTestString(customString);
}
COM: <s> checks that users can set a custom string for testing </s>
|
funcom_train/17585125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
if (this == object) {
return (true);
}
if ((object == null) || (object.getClass() != this.getClass())) {
return false;
}
SlimRadioItem item = (SlimRadioItem) object;
if (this.getRadioId().equals(item.getRadioId())) {
return (true);
} else {
return (false);
}
}
COM: <s> overrides the equals method </s>
|
funcom_train/29290303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getAllSurveyLiveForStaff() throws Exception{
SurveySession surveySession = SessionBeanFactory.getSurveySessionRemoteObject();
Integer survey_type_id = 1;
Integer survey_status_id = 2;
Integer group_id = 3;
return surveySession.getAllSurveyLiveWhereGroupId(survey_type_id, survey_status_id, group_id);
}
COM: <s> return all survey live for staff </s>
|
funcom_train/12118199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC57(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.rivalutazioniAggiungiJButton_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c57 rivalutazioni aggiungi jbutton </s>
|
funcom_train/10666175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InitialDirContext getCtx1() throws NamingException {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, factory);
env.put(Context.PROVIDER_URL, "dns://" + host + ":5353 dns://" + host);
ctx = new InitialDirContext(env);
return ctx;
}
COM: <s> create new initial context </s>
|
funcom_train/21999355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(File file) throws IOException {
FileWriter fileWriter = new FileWriter(file);
BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
PrintWriter printWriter = new PrintWriter(bufferedWriter);
// Iterate through transactions printing one on every line
Transactions.Record transactionsRecord = null;
int offset = 0;
do {
transactionsRecord = Transactions.getInstance().readnext(offset,
this);
if (transactionsRecord != null) {
Transaction transaction = transactionsRecord.transaction;
offset++;
printWriter.println(transaction);
}
} while (transactionsRecord != null);
printWriter.close();
}
COM: <s> writes a list of all transactions in the portfolio to the file </s>
|
funcom_train/33819356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NaturalSet removeBelow(int position){
if(!isEmpty() && domain.contains(position)){
if(position <= max()){
if(isContinuous()){
min = Math.max(min, position);
} else {
try {
int lposition = domain.toRelativeCoordinate(position);
BitSetIterator iterate = new BitSetIterator(map);
int i = iterate.next();
while(i > -1 && i < lposition){
map.fastClear(i);
i = iterate.next();
}
normalize();
} catch (NaturalSetException e) {
e.printStackTrace();
}
}
} else {
clear();
}
}
return this;
}
COM: <s> remove all the element strictly smaller than code position code </s>
|
funcom_train/37589195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
try { // _doc is inherited from DocumentRegion
_lineStartPos = _doc.createPosition(_doc._getLineStartPos(getStartOffset()));
_lineEndPos = _doc.createPosition(_doc._getLineEndPos(getEndOffset()));
}
catch (BadLocationException ble) { throw new UnexpectedException(ble); } // should never happen
}
COM: <s> update line start pos and line end pos after line has been edited </s>
|
funcom_train/40725488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startApp() {
tb = new TextBox("Google Translate API for JavaME", "", 500, TextField.ANY);
try {
String translatedText = Translate.translate("How are you", Language.ENGLISH, Language.FRENCH);
tb.setString(translatedText);
Display.getDisplay(this).setCurrent(tb);
} catch (Exception e) {
/*log error*/
}
}
COM: <s> show the translated output in a text box in the mobile phone screen </s>
|
funcom_train/15557170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HELEN_Algorithm_ModulesType getModule(String moduleId) {
HELEN_Algorithm_ModulesType result = null;
for (int i = 0; i != getCachedModules().length; i++) {
if (getCachedModules()[i].getId().equals(moduleId)) {
result = getCachedModules()[i];
break;
}
}
return result;
}
COM: <s> retrieve a module by its protege id </s>
|
funcom_train/16596731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ColorChooserPanel getBUnidadesColor() {
if (bUnidadesColor == null) {
bUnidadesColor = new ColorChooserPanel();
bUnidadesColor.setAlpha(255);
bUnidadesColor.setColor(textcolor);
bUnidadesColor.setPreferredSize(new java.awt.Dimension(100,25));
bUnidadesColor.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
textcolor = getBUnidadesColor().getColor();
}
});
}
return bUnidadesColor;
}
COM: <s> this method initializes b unidades color </s>
|
funcom_train/24461189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSQLValue(PreparedStatement ps, int index) throws SQLException {
if(getValue() == null) ps.setNull(index, getType().getType());
else throw new UnsupportedOperationException("Unimplemented Value.setSQLValue() method called, please override in a subclass!");
};
COM: <s> sets a value at a given index in a prepared stat ement </s>
|
funcom_train/6254626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OutboundRequest newRequest() throws IOException {
synchronized (muxLock) {
if (muxDown) {
throw new IOException(muxDownMessage);
}
int sessionID = busySessions.nextClearBit(0);
if (sessionID > Mux.MAX_SESSION_ID) {
throw new IOException("no free sessions");
}
Session session = new Session(this, sessionID, Session.CLIENT);
addSession(sessionID, session);
return session.getOutboundRequest();
}
}
COM: <s> starts a new request over this connection returning the </s>
|
funcom_train/1239997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator getAttachments(){
try {
if (mAttachments != null && 0 != mAttachments.getAttachmentCount()) {
return mAttachments.getAttachments().iterator();
}
} catch (AxisFault af){
log.error(Messages.getMessage("exception00"), af);
}
return Collections.EMPTY_LIST.iterator();
}
COM: <s> retrieves all the code attachment part code objects </s>
|
funcom_train/25565983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getCaptionKey(Property property, String captionId){
String prefix = "caption";
if(property instanceof ModelProperty && ((ModelProperty)property).getType()!=null){//field, not form
if(getFormId()!=null)//can be else?
prefix = getFormId().toString();
}
return prefix+'.'+captionId;
}
COM: <s> returns the key to query a bundle for ui name for the caption </s>
|
funcom_train/46382020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void triggerAction(int trigger, boolean pressed, String animationName) {
if (ClientContext.getRendererType()==RendererType.RENDERER_JME) {
CellRenderer rend = getCellRenderer(RendererType.RENDERER_JME);
if (rend instanceof AvatarActionTrigger) {
((AvatarActionTrigger)rend).trigger(trigger, pressed, animationName);
}
}
}
COM: <s> todo this is a temporary interface for handling avatar actions need </s>
|
funcom_train/13440921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopScheduling() {
keepRunning_ = false;
if (schedulerExecuting_.setIfNotEqual(true)) {
schedulerThread_.interrupt();
if (logger_.isLoggable(Level.FINE)) {
logger_.fine("Interrupted schedulerThread_ " + this);
}
}
synchronized (activeTimerMgrs_) {
activeTimerMgrs_.remove(this);
}
} //
COM: <s> stops all scheduling activities </s>
|
funcom_train/48023156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
MessageDialog.openInformation(
window.getShell(),
"Nexus HDL User Interface",
"Build start");
Synthesis SynthesisTool = new Synthesis();
try {
SynthesisTool.Use_XST();
}
catch(InvokeException e) {
System.out.println(e.getMessage());
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
COM: <s> the command has been executed so extract extract the needed information </s>
|
funcom_train/3291866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadsupport() {
Class cl;
try {
cl=Class.forName(databasesupportclass);
databasesupport=(DatabaseSupport)cl.newInstance();
databasesupport.init();
log.debug("Loaded load class : "+databasesupportclass);
} catch (Exception e) {
log.error("Can't load class : "+databasesupportclass+"\n"+Logging.stackTrace(e));
}
}
COM: <s> get the driver as specified in our properties </s>
|
funcom_train/4702236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class classFor( String srcType, String tgtType){
Registry registry = this.registryFor(srcType);
if (null == registry){
registry = this.registryFor(tgtType);
if (null == registry)
return null;
}
return registry.classFor(srcType,tgtType);
}
COM: <s> lookup a builtin source type registry and ask it for a </s>
|
funcom_train/9214136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addOverviewPage() {
try {
overviewPage = new OverviewPage(this, getModel());
addPage(overviewPage);
} catch (final PartInitException e) {
ErrorDialog.openError(getSite().getShell(), "Error creating nested "
+ "overview page", null, e.getStatus());
}
}
COM: <s> add the overview page </s>
|
funcom_train/22827778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeEmbeddedIndicesStmt(Table table, StringBuilder ddl) {
if (databaseInfo.isIndicesSupported()) {
for (int idx = 0; idx < table.getIndexCount(); idx++) {
printStartOfEmbeddedStatement(ddl);
writeEmbeddedIndexCreateStmt(table, table.getIndex(idx), ddl);
}
}
}
COM: <s> writes the indexes embedded within the create table statement </s>
|
funcom_train/3597070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getExtraCodings() {
String extracodings = getSomeSetting("extracodings");
if (extracodings == null || extracodings.length() == 0) {
return new ArrayList(0);
}
String[] codingnames = extracodings.split(";");
List codings = new ArrayList();
for (int i = 0; i < codingnames.length; i++) {
codings.add((Object)codingnames[i]);
}
return codings;
}
COM: <s> extracodings is used to load additional trees into </s>
|
funcom_train/25142180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBug41269() throws Exception {
createProcedure("bug41269",
"(in param1 int, out result varchar(197)) BEGIN select 1, ''; END");
ResultSet procMD = this.conn.getMetaData().getProcedureColumns(null,
null, "bug41269", "%");
assertTrue(procMD.next());
assertEquals("Int param length", 10, procMD.getInt(9));
assertTrue(procMD.next());
assertEquals("String param length", 197, procMD.getInt(9));
assertFalse(procMD.next());
}
COM: <s> bug 41269 database metadata </s>
|
funcom_train/23467498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUntilProcessPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RepeatUntil_untilProcess_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RepeatUntil_untilProcess_feature", "_UI_RepeatUntil_type"),
TemplatePackage.Literals.REPEAT_UNTIL__UNTIL_PROCESS,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the until process feature </s>
|
funcom_train/33705586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSpecificationEntry(String specification, File entry) {
Collection<File> entries = this.specificationEntries.get(specification);
if (null == entries) {
entries = new ArrayList<File>();
}
entries.add(entry);
this.specificationEntries.put(specification, entries);
}
COM: <s> adds a classpath entry for the given specification name </s>
|
funcom_train/42262571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int countLowerNoRobotsSendingMsg(Message msg) {
int counter = 0;
for (RobotTacticThread rtt : roleDispatcher.getRobotTacticThreads()) {
if (rtt.getRobotNumber() != this.robotNumber) {
if (rtt.readState().contains(msg) && rtt.getRobotNumber() < this.robotNumber)
++counter;
}
}
return counter;
}
COM: <s> finds robots which have lower number than current robot </s>
|
funcom_train/22027801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeTaskLog(CmsDbContext dbc, int taskid, String comment) throws CmsException {
m_workflowDriver.writeTaskLog(dbc, taskid, dbc.currentUser().getId(), new java.sql.Timestamp(
System.currentTimeMillis()), comment, CmsTaskService.TASKLOG_USER);
}
COM: <s> writes a new user tasklog for a task </s>
|
funcom_train/21954391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIconToOpen() {
if (getConnectedIcon() != null)
setIcon(getConnectedIcon());
else {
// create the new Icon.
ImageIcon icon = Pooka.getUIFactory().getIconManager().getIcon("FolderTree.Connected");
if (icon != null) {
setConnectedIcon(icon);
setIcon(getConnectedIcon());
}
}
}
COM: <s> sets the icon to the open icon </s>
|
funcom_train/50501717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean showConfirmDialog(IPanel panel, String title) {
ch.orcasys.editor.panel.dlog.ConfirmDialog dlog = new ch.orcasys.editor.panel.dlog.ConfirmDialog(panel, getMainFrame(), title, true);
dlog.load();
dlog.show();
return dlog.isAcknoledged();
}
COM: <s> show a confirm dialog </s>
|
funcom_train/3471594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTableData(Hashtable<String, String> data) {
clearTable();
for (String key : data.keySet()) {
String[] rowData = new String[2];
rowData[0] = key;
rowData[1] = data.get(key);
addRow(rowData);
}
}
COM: <s> sets the data of the table </s>
|
funcom_train/20537736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String computeErrorMessage() {
String name = StringUtils.trim(nameText.getText());
if (name.length() == 0) {
return "Name must be specified.";
} else if (CongressExplorerPlugin.getSearchManager().getSearch(name) != null) {
return "A saved search with that name already exists.";
} else {
return null;
}
}
COM: <s> computes the current error message </s>
|
funcom_train/19259266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UTMCoord getQuadSW() {
UTMCoord quadSW = null;
if ( quadSE != null && quadNW != null ) {
try {
quadSW = new UTMCoord( quadSE.getLatitude(), quadNW.getLongitude() );
} catch( ProjException e ) {
// Shouldn't happen if quadSE and quadNW are good.
e.printStackTrace();
}
}
return quadSW;
}
COM: <s> get utm coordinates of the southwest corner of the quadrangle </s>
|
funcom_train/8844487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doAction() {
String path =_gui.getSearchView().txtWorkDirGetText();
try{
path = _gui.showOpenDialog(_constraints);
}
catch (IOException e){
_gui.setStatus(e.getMessage());
}
setData(path);
}
COM: <s> sets the data that was chosen by user at the tab </s>
|
funcom_train/49199799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSequencePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(new SequenceChoosingPropertyDescriptor(
((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BranchingPointChoice_sequence_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BranchingPointChoice_sequence_feature", "_UI_BranchingPointChoice_type"),
ExhibitionPackage.Literals.BRANCHING_POINT_CHOICE__SEQUENCE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the sequence feature </s>
|
funcom_train/48911062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (this == o)
return true;
if (! (o instanceof ValueVector))
return false;
ValueVector vv = (ValueVector) o;
if (m_ptr != vv.m_ptr)
return false;
for (int i = m_ptr - 1; i >= 0; i--)
if (!m_v[i].equals(vv.m_v[i]))
return false;
return true;
}
COM: <s> compare this value vector to another object </s>
|
funcom_train/1864899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawRoundedBox(Point point1, Point point2, boolean isBlack, boolean filled) {
synchronized (image) {
graphicsArea.setColor(convertBoolean(isBlack));
graphicsArea.drawRoundRect(point1.x, point1.y, point2.x-point1.x, point2.y-point1.y, 8, 8);
}
}
COM: <s> draw a rounded box </s>
|
funcom_train/3810826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finish() {
if (getValue() == null) {
throw new IllegalStateException("The enumeration items 'value' attribute is not set.");
}
if (getName() == null) {
try {
Util.asJavaIdentifier(getValue().toUpperCase());
} catch (Exception e) {
throw new IllegalStateException("The enumeration items 'name' attribute is not set " +
" and the value " + getValue() +
" cannot be converted into a valid Java identifier.");
}
}
}
COM: <s> p verifies the enumeration item </s>
|
funcom_train/45864051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prepTrack(boolean hasGhosts, int numKarts, boolean hasPickups, boolean hasPowerups) throws IOException {
logic.setGhostMode(hasGhosts);
logic.init(numKarts, player, mpPlayerIdx, LAPS_PER_RACE, hasPickups, hasPowerups);
chrome.reset();
chrome.init(LAPS_PER_RACE, trackNum, mpPlayerIdx);
chrome.setBest(best[trackNum]);
prepTrack();
}
COM: <s> prepares the track screen for a new game </s>
|
funcom_train/5405919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAnonymousAuth() {
// Anonymous users have a full JID. Use the random resource as the JID's node
String resource = getAddress().getResource();
setAddress(new JID(resource, getServerName(), resource));
sessionManager.addAnonymousSession(this);
setStatus(Session.STATUS_AUTHENTICATED);
}
COM: <s> initialize the session as an anonymous login </s>
|
funcom_train/23867276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FacesMessage getFormattedErrorMessage(final Object... messageArguments) {
CDebug.precondition(CString.isNotEmpty(message),
"getFormattedErrorMessage may only be used when a message attribute has been supplied!");
final String formattedMessage = Formatter.format(JsfLocaleUtil.getCurrentLocale(), message, messageArguments);
FacesMessage facesMessage = new FacesMessage(formattedMessage);
facesMessage.setSeverity(FacesMessage.SEVERITY_ERROR);
return facesMessage;
}
COM: <s> gets the formatted error message by substituting the supplied </s>
|
funcom_train/8009347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUseJavaScriptForRangeRules(boolean b) {
_useJavaScriptForRangeRules = b;
try {
//fc 06/11/04: Updated logic to make validate range dependent on
// the value of _useJavaScriptForValidationOnly.
getValidator().setValidateRange(!(b && _useJavaScriptForValidationOnly));
} catch (Exception ex) {
}
}
COM: <s> sets whether or not to use javascript for range rules </s>
|
funcom_train/34562964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final QNm name) throws QueryException {
final byte[] ln = name.ln();
if(eq(ln, XML) || eq(ln, XMLNS)) Err.or(NSDEF, name);
final byte[] uri = name.uri.str();
if(eq(XMLURI, uri)) Err.or(NOXMLNS, name);
ns.add(ln, uri);
}
COM: <s> adds the specified namespace </s>
|
funcom_train/17754383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rewind(int mark) {
syncConsume();
markerOffset = mark;
nMarkers--;
//System.out.println("Rewinding to " + mark);
//try { for (int i = 1; i <= 2; i++) { System.out.println("LA("+i+")=="+LT(i).getText()); } } catch (ScannerException e) {}
}
COM: <s> rewind the token buffer to a marker </s>
|
funcom_train/3410180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColumns(int columns) {
int oldVal;
synchronized (this) {
oldVal = this.columns;
if (columns < 0) {
throw new IllegalArgumentException("columns less than zero.");
}
if (columns != oldVal) {
this.columns = columns;
}
}
if (columns != oldVal) {
invalidate();
}
}
COM: <s> sets the number of columns in this text field </s>
|
funcom_train/15566017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RTGraph createMemGraph(String iuia, String iuid){
LocalService service = Sesame.getService();
try{
LocalRepository myRepository = service.createRepository("mem" + counter++, false);
return new RTGraphImp(new RdfRepository((org.openrdf.sesame.sail.RdfRepository)myRepository.getSail()),iuia, iuid );
}catch(Exception e){
}
return null;
}
COM: <s> this method creates an instance of </s>
|
funcom_train/3543828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Role getRole() throws Exception {
/* The result role */
Role role = null;
if (getModeType() == ModeType.CREATE) {
/* CREATE mode. Creating a new role */
role = SecurityGate.createRole();
/* Setting the new role key */
setKey((RolePK) role.getPrimaryKey());
} else {
/* EDIT/REVIEW mode. Getting the current role */
RolePK rolePK = getKey();
role = SecurityGate.getRole(rolePK);
}
/* The result role */
return role;
}
COM: <s> returns a role object for current view </s>
|
funcom_train/26325856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addCompactGyro() {
if (getEmptyCriticals(LOC_CT) < 2) {
return false;
}
addCritical(LOC_CT, 3, new CriticalSlot(CriticalSlot.TYPE_SYSTEM,
SYSTEM_GYRO));
addCritical(LOC_CT, 4, new CriticalSlot(CriticalSlot.TYPE_SYSTEM,
SYSTEM_GYRO));
setGyroType(GYRO_COMPACT);
return true;
}
COM: <s> add the critical slots necessary for a compact gyro </s>
|
funcom_train/43210322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matchName(String name) {
// Use javaUpper/LowerCase in order to support foreign non ASCII chars
Pattern p = Pattern.compile("\\p{javaUpperCase}\\p{javaLowerCase}*");
StringTokenizer tokenizer = new StringTokenizer(name);
while (tokenizer.hasMoreTokens()) {
Matcher m = p.matcher(tokenizer.nextToken());
if (!m.matches() || m.group().length() < 2) return false;
}
return true;
}
COM: <s> this method checks if the provided name matches the requirements </s>
|
funcom_train/48407266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addImportedElementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ElementImport_importedElement_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ElementImport_importedElement_feature", "_UI_ElementImport_type"),
SpemxtcompletePackage.eINSTANCE.getElementImport_ImportedElement(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the imported element feature </s>
|
funcom_train/8615627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public View resolveViewName(String viewName, Locale arg1) throws Exception {
if (viewName.startsWith(REDIRECT_URL_PREFIX)) {
String redirectUrl = viewName.substring(REDIRECT_URL_PREFIX.length());
return new RedirectView(redirectUrl, true, true, false);
}
return null;
}
COM: <s> used by spring to parse the redirection url and instantiate the </s>
|
funcom_train/50737846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void encryptAllPasswords() {
log.info("Encrypting all passwords");
if (ThreadProperties.isTransactionInProgress() == false) {
ThreadProperties.beginTransaction();
} else {
}
UserPasswordHelper helper = new UserPasswordHelper();
helper.encryptAllUserPasswords();
ThreadProperties.forcedCommit();
}
COM: <s> encrypt all unencrypted passwords in user database table </s>
|
funcom_train/9236157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DefaultMutableTreeNode changeFocusUp(final DefaultMutableTreeNode node) {
DefaultMutableTreeNode nextNode;
nextNode = node.getPreviousNode();
if (nextNode == null || (nextNode == model.getRoot() && !rootVisible)) {
nextNode = rootNode.getLastLeaf();
}
return nextNode;
}
COM: <s> changes the tree focus up </s>
|
funcom_train/20045582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _unload() {
requiredMethod("reload()") ;
requiredMethod("addLoadListener()") ;
boolean result = true ;
oObj.unload() ;
shortWait() ;
result = !oObj.isLoaded() && loadListener.unloadedCalled ;
tRes.tested("unload()", result) ;
}
COM: <s> unloads the form </s>
|
funcom_train/3409008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(byte[] input, int offset, int len) {
if (input == null) {
throw new IllegalArgumentException("No input buffer given");
}
if (input.length - offset < len) {
throw new IllegalArgumentException("Input buffer too short");
}
engineUpdate(input, offset, len);
state = IN_PROGRESS;
}
COM: <s> updates the digest using the specified array of bytes starting </s>
|
funcom_train/36995440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawRectangle( int x, int y, int width, int height ) {
movePenTo(x, y);
drawLineTo(x + width, y);
drawLineTo(x + width, y + height);
drawLineTo(x, y + height);
drawLineTo(x, y);
}
COM: <s> draws a rectangle specified by its top left corner and width and height </s>
|
funcom_train/18735851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean handleMessage(IMessage message) {
if ((null != interceptor) && (interceptor.handleMessage(message))) {
return true;
}
if (null == message) {
throw new IllegalArgumentException("null message");
}
if (!ignoring.contains(message.getKind())) {
messages.add(message);
}
return handleMessageResult;
}
COM: <s> this implementation accumulates message </s>
|
funcom_train/18661052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SortableDefaultMutableTreeNode getIndex( int index ) {
if ( resultList == null ) {
logger.info( "CategoryQuery.getIndex: called on a null result set." );
return null;
}
if ( ( index < 0 ) || ( index >= resultList.size() ) ) {
return null;
}
return resultList.get( index );
}
COM: <s> this method returns the sdmtn node for the indicated position in the query </s>
|
funcom_train/3772197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getIsLocked() {
boolean result = false;
try {
Lock lock = nat.getLockHelper();
result = lock.isLocked(st, node, new SubjectNode("/"),
new ActionNode("/"), false);
}
catch (SlideException e) {
// ignore for now
}
return result;
}
COM: <s> determines whether any kind of lock exists on the node </s>
|
funcom_train/3369611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuItem insert(Action a, int pos) {
if (pos < 0) {
throw new IllegalArgumentException("index less than zero.");
}
ensurePopupMenuCreated();
JMenuItem mi = new JMenuItem(a);
mi.setHorizontalTextPosition(JButton.TRAILING);
mi.setVerticalTextPosition(JButton.CENTER);
popupMenu.insert(mi, pos);
return mi;
}
COM: <s> inserts a new menu item attached to the specified code action code </s>
|
funcom_train/6459424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp () throws Exception {
super.setUp ();
try {
System.out.println ("---- start transaction");
dbSess.startTransaction ();
createAuthors ();
System.out.print("-------- Commiting");
dbSess.commitTransaction ();
System.out.println(".... done");
}
catch (Exception e) {
dbSess.rollbackTransaction();
e.printStackTrace();
throw e;
}
}
COM: <s> get the connection to the db </s>
|
funcom_train/4508993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MediaProxySession getSession(String sid) {
MediaProxySession proxySession = sessions.get(sid);
if (proxySession != null) {
if (Log.isDebugEnabled()) {
Log.debug("MediaProxy: SID: " + sid + " agentSID: " + proxySession.getSID());
return proxySession;
}
}
return null;
}
COM: <s> returns a media proxy session with the specified id </s>
|
funcom_train/44823116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getVisibility() {
String visibility = "package";
if ((modifiers & Modifier.PRIVATE) != 0) {
visibility = "private";
} else if ((modifiers & Modifier.PROTECTED) != 0) {
visibility = "protected";
} else if ((modifiers & Modifier.PUBLIC) != 0) {
visibility = "public";
}
return visibility;
}
COM: <s> accessor for visibility property </s>
|
funcom_train/24262148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValidationN3() {
try {
OntologyTerm ontologyTerm1 = new OntologyTerm();
ontologyTerm1.setTerm("morbidity");
ontologyTerm1.setOntologyName("LHA");
ontologyTerm1.setNameSpace("");
curationService.addOntologyTerm(demoUser, ontologyTerm1);
fail();
}
catch(MacawException exception) {
int totalNumberOfErrors
= exception.getNumberOfErrors();
assertEquals(1, totalNumberOfErrors);
int numberOfErrors
= exception.getNumberOfErrors(MacawErrorType.INVALID_ONTOLOGY_TERM);
assertEquals(1, numberOfErrors);
log.logException(exception);
}
}
COM: <s> validation fails if ontology name space is left blank </s>
|
funcom_train/44287116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void previousMonth() {
synchronized (selectionRoot) {
if (comboMonth.getSelectedIndex() > 0) {
comboMonth.setSelectedIndex(comboMonth.getSelectedIndex() - 1);
} else {
if (comboYear.getSelectedIndex() > 0) {
comboYear.setSelectedIndex(comboYear.getSelectedIndex() -
1);
}
comboMonth.setSelectedIndex(11);
}
}
}
COM: <s> displays previous month </s>
|
funcom_train/3891750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getMetadataFile() {
String path = getLocation();
if(path == null || path.length() == 0) {
return null;
}
File folder = ((LearningDesignDataModel)getDataModel()).getMetadataFolder();
File file = new File(folder, path);
return file;
}
COM: <s> get the file in the metadata folder given its relative location </s>
|
funcom_train/38307235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChunk(BaseDocumentTag item, Chunk chunk) {
if (!isTrue()) {
return;
}
if (phrase == null) {
phrase = new Phrase(0.0F);
}
addChunk(phrase, chunk, getLeading(), getLineSpacing());
items.add(new ContentPart(phrase));
this.phrase = null;
}
COM: <s> adds the given chunk to the root phrase </s>
|
funcom_train/28116947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invoke(String[] args) throws Exception {
// parse the command line
Options options = getOptions();
CommandLineParser parser = new PosixParser();
CommandLine commands = null;
try {
commands = parser.parse(options, args);
} catch (ParseException exception) {
usage(options, exception.getMessage());
}
MessagingTool tool = create();
parse(tool, commands);
tool.invoke();
}
COM: <s> invoke the command </s>
|
funcom_train/20789750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Canvas removeShapes(CTag shapes) {
if (shapes == null)
return this;
LinkedList<Object> taggedShapes = new LinkedList<Object>();
for (shapes.reset(); shapes.hasNext();)
taggedShapes.add(shapes.nextShape());
for (Iterator<Object> i = taggedShapes.iterator(); i.hasNext();)
((CShape) i.next()).prepareToRemove();
displayOrder.removeAll(taggedShapes);
repaint();
return this;
}
COM: <s> removes a set of tagged shapes from the canvas </s>
|
funcom_train/118839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GPDocument getCurrentDocument() {
GPInternalFrame internalFrame =
(GPInternalFrame) desktop.getSelectedFrame();
if (internalFrame == null) {
JInternalFrame[] frames = desktop.getAllFrames();
if (frames.length > 0) {
try {
frames[0].setSelected(true);
internalFrame = (GPInternalFrame) frames[0];
} catch (PropertyVetoException e) {
return null;
}
}
}
if (internalFrame == null)
return null;
return internalFrame.getDocument();
}
COM: <s> returns the currently selected document </s>
|
funcom_train/8525679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTransport(Transport transport) {
if (isStarted) {
throw new IllegalStateException(
"Attempt to add transport to running container");
}
LOG.debug("Adding transport '" + transport + "'");
transport.setServiceContainer(this);
synchronized (transports) {
transports.add(transport);
}
}
COM: <s> adds a code transport code to this container </s>
|
funcom_train/50344303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RollingStock getByTypeAndRoad(String type, String road){
Enumeration<String> en = _hashTable.keys();
while (en.hasMoreElements()) {
RollingStock rs = getById(en.nextElement());
if(rs.getType().equals(type) && rs.getRoad().equals(road))
return rs;
}
return null;
}
COM: <s> get a rolling stock by type and road </s>
|
funcom_train/51591769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TableCellRenderer getCellRenderer(int row, int column) {
if (errors.contains(new Integer(row))) {
return (ctcrError);
}
if (warnings.contains(new Integer(row))) {
return (ctcrWarning);
}
return (super.getCellRenderer(row, column));
}
COM: <s> return the cell renderer for for the table </s>
|
funcom_train/37586960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public String getFilenamex() {
// String filename = "(Untitled)";
// try {
// File file = getFilex();
// filename = file.getName();
// }
// catch (IllegalStateException ise) {
// // No file, leave as "untitled"
// }
// catch (FileMovedException fme) {
// // Recover, even though file has been deleted
// File file = fme.getFile();
// filename = file.getName();
// }
// return filename;
// }
COM: <s> returns the name of this file or untitled if no file </s>
|
funcom_train/18256525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Graphics g, Object object, int width, int height) {
g.setColor(backgroundColor);
g.fillRect(0, 0, width, height);
g.drawImage(imageFeature.getImage(object), 0, 0, null);
}
COM: <s> draws a graphic interpreation of the object into the supplied graphics port </s>
|
funcom_train/32327842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void makeTransparent(final BufferedImage image, final int rgb) {
for (int i = 0; i < image.getWidth(); i++) {
for (int j = 0; j < image.getHeight(); j++) {
if (rgb == image.getRGB(i, j)) {
image.setRGB(i, j, TRANSPARENT_RGB);
}
}
}
}
COM: <s> applies a chroma keying effect on pixels with an rgb value </s>
|
funcom_train/9763293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeUByte(final short val) {
if (val < 0) {
throw new IllegalArgumentException("Negative value (" + val + ") passed to unsigned writing method.");
}
if (val > MAX_UBYTE) {
throw new IllegalArgumentException("Value (" + val + ") to large to be written as ubyte.");
}
byteBuffer.clear();
byteBuffer.putShort(val);
writeByteBuffer(1);
}
COM: <s> write an 8 bit unsigned byte </s>
|
funcom_train/20245074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setColorActive(boolean active) {
CSS.setProperty(buttonTop, CSS.A.BACKGROUND_COLOR,
active ? colorContentBottom : colorContentTop);
CSS.setProperty(inner, CSS.A.BACKGROUND_COLOR,
active ? colorContentTop : colorContentBottom);
}
COM: <s> set the background color when the user activates the button </s>
|
funcom_train/21982738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JBarcode createCodabar(){
JBarcode jbc = new JBarcode(CodabarEncoder.getInstance(), WideRatioCodedPainter.getInstance(), BaseLineTextPainter.getInstance());
jbc.setBarHeight(17);
try {
jbc.setXDimension(0.264583333);
} catch (InvalidAtributeException e) {}
jbc.setShowText(true);
jbc.setCheckDigit(false);
jbc.setShowCheckDigit(false);
return jbc;
}
COM: <s> creates a new jbarcode instance to codabar barcode type </s>
|
funcom_train/27844454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteAction() throws Exception {
ActionController controller = new ActionController();
ActionEvent event = new ActionEvent(this, "actionId");
MockAction action = new MockAction();
_threadSupport.setActionExecutor(_actionExecutor);
_threadSupport.executeAction(action, event, controller);
assertTrue(action.isExecuted());
}
COM: <s> test for execute action </s>
|
funcom_train/24216644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectSetup(String str) {
for(int i = 0 ; i < getItemCount() ; i++) {
String s = getItemAt(i).toString();
if (s.substring(0,s.lastIndexOf('.')).equals(str)) setSelectedIndex(i);
}
}
COM: <s> select a specific setup in this list </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.