__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/38542705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInt(int parameterIndex, int x) throws SQLException {
try {
((PreparedStatement) this.realStatement).setInt(parameterIndex, x);
if (parameterIndex <= this.currentParams.length) {
this.currentParams[parameterIndex - 1] = new Integer(x);
}
} catch (SQLException e) {
manageException(e);
throw generateException(e);
}
}
COM: <s> sets the designated parameter to the given java code int code value </s>
|
funcom_train/5395465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDeserializationTime() {
System.out.println("getDeserializationTime");
CubbyHole instance = new CubbyHole();
long expResult = 0L;
long result = instance.getDeserializationTime();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get deserialization time method of class org </s>
|
funcom_train/26483978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void buildWindow() {
JPanel editorPanel = buildBoundsEditor();
// OK, Apply, Revert, and Cancel Buttons
JPanel buttonPanel = closeButtonPanel();
// Add values and buttons to window
getContentPane().add(editorPanel, BorderLayout.CENTER);
getContentPane().add(buttonPanel, BorderLayout.SOUTH);
}
COM: <s> builds the window contents </s>
|
funcom_train/7623051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public View apply(Context context, ViewGroup parent) {
View result = null;
Context c = prepareContext(context);
Resources r = c.getResources();
LayoutInflater inflater = (LayoutInflater) c
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater = inflater.cloneInContext(c);
inflater.setFilter(this);
result = inflater.inflate(mLayoutId, parent, false);
performApply(result);
return result;
}
COM: <s> inflates the view hierarchy represented by this object and applies </s>
|
funcom_train/43602385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.notifications);
TextView notify = (TextView)findViewById(R.id.notificationText);
Bundle extras = getIntent().getExtras();
if( !extras.getString("nofication").equals(null) )
notify.setText(extras.getString("notification"));
}
COM: <s> creates an activity that displays a brief </s>
|
funcom_train/37586420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean _gapToLeft() {
// Before using, make sure not at first or head.
return (! _tokens.isEmpty() && ! _cursor.atStart() && ! _cursor.atFirstItem() && _cursor.prevItem().isGap());
}
COM: <s> determines if there is a gap immediately to the left of the cursor </s>
|
funcom_train/2033652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBuscarDatosDeMaterial() {
System.out.println("buscarDatosDeMaterial");
Material material = new Material();
Material instance = new Material();
Material expResult = null;
Material result = instance.buscarDatosDeMaterial(material);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
}
COM: <s> test of buscar datos de material method of class material </s>
|
funcom_train/7638784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleException(Throwable t) {
String msg = t.getMessage();
if (msg == null) {
Throwable cause = t.getCause();
if (cause != null) {
handleException(cause);
} else {
setErrorMessage("Uknown error when getting the debug key!");
}
return;
}
// valid text, display it.
showErrorMessage(msg);
}
COM: <s> set the error message from a </s>
|
funcom_train/16148163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomReset() {
final int posX = (int) (((viewport.getViewPosition().x) + (viewport
.getWidth() / 2)) / zoomLevel);
final int posY = (int) (((viewport.getViewPosition().y) + (viewport
.getHeight() / 2)) / zoomLevel);
zoomLevel = 1;
zoom(posX, posY);
}
COM: <s> sets the zoom to 100 </s>
|
funcom_train/3877834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
Entity[] rem;
synchronized ( this ) {
m_query = null;
rem = (Entity[])m_set.toArray(FocusEvent.EMPTY);
m_set.clear();
}
FocusEvent fe = new FocusEvent(this, FocusEvent.FOCUS_REMOVED, null, rem);
m_listener.focusChanged(fe);
} //
COM: <s> clears this focus set invalidating any previous search </s>
|
funcom_train/43410125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BrowsePanel getJPackagingMaterialInnerPanel() {
if (jPackagingMaterialInnerPanel == null) {
CommonTableModel tableModel = new CommonTableModel(
TableModels.PACKAGING_MATERIAL_COLUMNS,
TableModels.PACKAGING_MATERIAL_METHODS);
PackagingMaterialFilterManager mgr = new PackagingMaterialFilterManager();
tableModel.setList(mgr.getList());
jPackagingMaterialInnerPanel = new BrowsePanel(mgr, tableModel);
jPackagingMaterialInnerPanel.setAddEnabled(true);
}
return jPackagingMaterialInnerPanel;
}
COM: <s> this method initializes j packaging material inner panel </s>
|
funcom_train/47490798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getRingerLoginCommand() {
if (ringerLoginCommand == null) {//GEN-END:|26-getter|0|26-preInit
// write pre-init user code here
ringerLoginCommand = new Command("Timbrador", Command.OK, 0);//GEN-LINE:|26-getter|1|26-postInit
// write post-init user code here
}//GEN-BEGIN:|26-getter|2|
return ringerLoginCommand;
}
COM: <s> returns an initiliazed instance of ringer login command component </s>
|
funcom_train/13187914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCalculateMean1() {
List values = new ArrayList();
values.add(new Double(9.0));
values.add(new Double(3.0));
values.add(new Double(2.0));
values.add(new Double(2.0));
double mean = Statistics.calculateMean(values);
assertEquals(4.0, mean, 0.0000001);
}
COM: <s> a simple test for the calculate mean collection method </s>
|
funcom_train/1726685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showStatus(String message, boolean isError) {
mainPanel.clear();
mainPanel.insertRow(0);
mainPanel.addCell(0);
Label msg = new Label(message);
if (isError) {
msg.setStylePrimaryName("hm-error");
}
mainPanel.setWidget(0, 0, msg);
}
COM: <s> displays a status message to the user </s>
|
funcom_train/5723625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String removeShortcut() {
try {
if (desktopInfo == null || desktopInfo.getId() == null) {
refreshDesktop();
}
desktopService2.unlinkInstitute(desktopInfo.getId(), instituteInfo.getId());
refreshDesktop();
} catch (Exception e) {
addError(i18n("institute_error_remove_shortcut"), e.getMessage());
return Constants.FAILURE;
}
addMessage(i18n("institute_success_remove_shortcut"));
return Constants.SUCCESS;
}
COM: <s> removes the shortcut to the institute </s>
|
funcom_train/6289410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean handleMailDiscoveredByPolling(String ID) {
if (!getTargetBox().wasOnceDownloaded(account.getEmail(), ID)) {
if (Settings.pollDownloadsMails) {
getNewMails( getTargetBox());
}
if (Settings.pollPlaysSound) {
new AudioAlert();
}
return true;
}
return false;
}
COM: <s> this method should be called if polling discovers mail with given id </s>
|
funcom_train/47139330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void internalSetCatalog (CatalogImpl ciRef) {
if (m_ciCatalog != null) {
m_ciCatalog.removeCatalogChangeListener (m_cclEditListener);
}
m_ciCatalog = ciRef;
if (m_ciCatalog != null) {
m_ciCatalog.addCatalogChangeListener (m_cclEditListener);
}
m_dbCatalogValidator = null;
}
COM: <s> set the catalog that this stock refers to </s>
|
funcom_train/31406388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent evt) {
// open up browser for windows platform only
String cmd =
"rundll32.exe url.dll,FileProtocolHandler "
+ AppProperties.getProperty("WordcorrHelp");
try {
Runtime.getRuntime().exec(cmd);
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> show the wordcorr help box </s>
|
funcom_train/10873123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addSuffix(State state, CharSequence current, int fromIndex) {
final int len = current.length();
while (fromIndex < len) {
int cp = Character.codePointAt(current, fromIndex);
state = state.newState(cp);
fromIndex += Character.charCount(cp);
}
state.is_final = true;
}
COM: <s> add a suffix of code current code starting at code from index code </s>
|
funcom_train/5374528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTopIndex (int index) {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return;
/*
int count = OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);
index = Math.min (Math.max (index, 0), count - 1);
int topIndex = OS.SendMessage (handle, OS.EM_GETFIRSTVISIBLELINE, 0, 0);
OS.SendMessage (handle, OS.EM_LINESCROLL, 0, index - topIndex);
*/
}
COM: <s> sets the zero relative index of the line which is currently </s>
|
funcom_train/18306522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeDefaults() {
IPreferenceStore store = getPreferenceStore();
store.setDefault(P_AUTOMATIC_LOGIN, true);
store.setDefault(P_SHOW_WEASEL_IN_SYSTRAY, true);
// store.setDefault(P_BOOLEAN, true);
// store.setDefault(P_CHOICE, "choice2");
// store.setDefault(P_STRING, "Default value");
}
COM: <s> sets the default values of the preferences </s>
|
funcom_train/1566592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() {
for (Map.Entry<String, Map<String, Object>> configEntry : config.entrySet()) {
@SuppressWarnings("unchecked")
Map<String, Object> value = (Map<String, Object>) evaluateAll(configEntry.getValue());
configEntry.setValue(value);
}
}
COM: <s> initializes the configuration </s>
|
funcom_train/40616695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection getConnection() throws SQLException {
debugCodeCall("getConnection");
Connection lastHandle = handleConn;
if (lastHandle != null) {
lastHandle.close();
}
// this will ensure the rollback command is cached
physicalConn.rollback();
handleConn = new PooledJdbcConnection(physicalConn);
return handleConn;
}
COM: <s> get a connection that is a handle to the physical connection </s>
|
funcom_train/45692170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPatternCountPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Sample_patternCount_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Sample_patternCount_feature", "_UI_Sample_type"),
EsxPackage.Literals.SAMPLE__PATTERN_COUNT,
false,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the pattern count feature </s>
|
funcom_train/25226695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveLoginPassword(String login, String password){
File fileExt= new File(SETTINGS_FILE_PATH);
try {
FileOutputStream outExt = new FileOutputStream(fileExt);
DataOutputStream dos=new DataOutputStream(outExt);
try {
dos.writeUTF(login);
dos.writeUTF(password);
dos.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> save login and password into a file </s>
|
funcom_train/14083324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean copyFile(String src, String dest) {
try {
FileInputStream source = new FileInputStream(src);
FileOutputStream destination = new FileOutputStream(dest);
byte[] buffer = new byte[1024];
int i = 0;
while ((i = source.read(buffer)) != -1) {
destination.write(buffer, 0, i);
}
source.close();
destination.close();
} catch (IOException e) {
System.err.println(messages.getMessage("io_error_msg")
+ e.getMessage());
return false;
}
return true;
}
COM: <s> copy the contents of a file to another file like unix cp command </s>
|
funcom_train/1302990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTimeToQuit() {
if (die.get()) return true;
boolean result = false;
while (paused.get()) { // didn't get resumed yet
if (die.get()) {
result = true; // time to die
break;
}
// sleep for a spell
try {
Thread.sleep(pauseCheckInterval);
}
catch (InterruptedException e) {
result = true; // interrupted without resume == quit
break;
}
}
return result;
}
COM: <s> check for die and wait for pause to resume </s>
|
funcom_train/8241553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void store() {
FileOutputStream out;
try {
out = new FileOutputStream(fileName);
config.store(out, "");
out.close();
} catch (FileNotFoundException ex) {
ex.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
}
}
COM: <s> stores real parameters into a property file </s>
|
funcom_train/9196511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setId(String id) {
if ((id.length() % 3) != 0) {
System.out.println("Invalid ID: " + id);
}
StringBuilder targetId = new StringBuilder();
for (int i = 0; i < id.length(); i += 3) {
targetId.append(id.substring(i, i + 3));
targetId.append(" ");
}
this.label.setId(targetId.toString().trim());
}
COM: <s> label id is constructed as 3 groups of 3 characters </s>
|
funcom_train/40704364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void photosGet(Long subjId, Long aid, List<Long> pids, final AsyncCallback<List<Photo>> callback) {
Json j = new Json ().put ( "subj_id", subjId ).put ( "aid", aid ).put ( "pids", pids );
callMethodRetList ( "photos.get", j.getJavaScriptObject (), Photo.class, callback );
}
COM: <s> returns all visible photos according to the filters specified </s>
|
funcom_train/2856191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IPv4Address (String host, int port) throws AddressException {
InetAddress iAddr;
try {
iAddr = InetAddress.getByName(host);
} catch (UnknownHostException e) {
throw new AddressException ("bad host address: " + e);
}
saddr = new InetSocketAddress (iAddr , port);
}
COM: <s> create a valid address port number pair </s>
|
funcom_train/4867085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean queued(Class<?> actionClass) {
// remove all queued actions of this type
Iterator<Action> it = this.queuedActions.iterator();
while(it.hasNext()) {
Action action = it.next();
if ( action.getClass().equals(actionClass) ) {
return true;
}
}
// determine if the current action is NULL
return (this.currentAction != null) ?
this.currentAction.getClass().equals(actionClass) : false;
}
COM: <s> determine if an </s>
|
funcom_train/16463010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void centralise(Frame owner) {
Dimension screen_size = owner.getSize();
Point p = owner.getLocation();
this.setLocation(p.x + ((screen_size.width - this.getWidth()) >> 1),
p.y + ((screen_size.height - this.getHeight()) >> 1));
}
COM: <s> centralises this dialog according to the frame owner </s>
|
funcom_train/784961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Shape triangle_right(float x, float y, float height) {
m_path.reset();
m_path.moveTo(x,y+height);
m_path.lineTo(x+height, y+height/2);
m_path.lineTo(x, y);
m_path.closePath();
return m_path;
}
COM: <s> returns a right pointing triangle of the given dimenisions </s>
|
funcom_train/50440344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IAWidget checkParent(IAWidget obj){
// Method attributes
IAWidget parent=null;
try {
if (m_akoRoot == null){
m_akoRoot = obj;
}
if (!m_stack.empty()){
parent = (IAWidget)m_stack.peek();
obj.setParent(parent);
}
}
catch (Exception error){
error.printStackTrace();
}
return(parent);
}
COM: <s> check rate root checks the root element of a rate tree </s>
|
funcom_train/28634119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActiveMode(EyeTrackingMode eyeTrackingMode) {
for (int i = 0; i < this.modes.length; i++) {
if (this.modes[i] == eyeTrackingMode) {
if (this.activeModeIndex != i) {
this.activeModeIndex = i;
// notify observers about change
setChanged();
notifyObservers(eyeTrackingMode);
}
}
}
}
COM: <s> sets a new active mode </s>
|
funcom_train/37571488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFrom(String from) throws SOAPException {
SOAPElement ebxmlFrom = findOrMakeChild(m_ebxmlHeader, "eb:From");
SOAPElement ebxmlPartyFrom = findOrMakeChild(ebxmlFrom, "eb:PartyId");
ebxmlPartyFrom.removeContents();
if (from != null)
ebxmlPartyFrom.addTextNode(from);
}
COM: <s> set my senders uri </s>
|
funcom_train/35831473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Location getLocation() {
Location location = new Location();
try {
if (isConnected && isActive && currentInfo != null) {
location.parseGPGGA(currentInfo);
}
} catch (Throwable t) {
error = "get:" + t.toString();
close();
}
return location;
}
COM: <s> parses data from current sentence and return a location </s>
|
funcom_train/26278839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DownloadInfo getDownloadInfo(short destination) throws JSmbGetException{
for(int i=0; i<downloads.size(); i++){
ClientDownload download = (ClientDownload)downloads.get(i);
if(download.getDestination() == destination){
return download.getInfo();
}
}
throw new JSmbGetException("No such ID.");
}
COM: <s> gets the info about a specific download </s>
|
funcom_train/50090741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IAtomContainer removingFlagsAromaticity(IAtomContainer ac) {
Iterator<IAtom> atoms = ac.atoms().iterator();
while (atoms.hasNext()) atoms.next().setFlag(CDKConstants.ISAROMATIC, false);
Iterator<IBond> bonds = ac.bonds().iterator();
while (bonds.hasNext()) bonds.next().setFlag(CDKConstants.ISAROMATIC, false);
return ac;
}
COM: <s> remove the aromaticity flags </s>
|
funcom_train/2886599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws ServletException {
try {
SFSystem.initSystem();
}
catch (SmartFrogException sfe) {
throw new ServletException("Unable to initialise SmartFrog Daemon.",
sfe);
}
catch (SFGeneralSecurityException sfgse) {
throw new ServletException(
"A security exception prohibited the SmartFrog Daemon from being initialised.",
sfgse);
}
}
COM: <s> performs initialisation tasks for the servlet </s>
|
funcom_train/8076079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConnectPoints(boolean [] cp) throws Exception {
m_connectPoints = cp;
if (m_connectPoints.length != m_plotInstances.numInstances()) {
throw new Exception("PlotData2D: connect points array must have the "
+"same number of entries as number of data points!");
}
m_connectPoints[0] = false;
}
COM: <s> set whether consecutive points should be connected by lines </s>
|
funcom_train/4125412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TileImprovement addRiver(int magnitude, int style) {
if (magnitude == TileImprovement.NO_RIVER) {
return null;
}
TileImprovement river = new TileImprovement(getGame(), tile, Reformation.getSpecification()
.getTileImprovementType("model.improvement.River"));
river = (TileImprovement) addTileItem(river);
river.setMagnitude(magnitude);
river.setStyle(style);
return river;
}
COM: <s> creates a river code tile improvement code and adds to this tile container </s>
|
funcom_train/3913580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EnvironmentProperty getEnvironment(Uol uol, Run run, User user, String propId) throws PropertyException {
String key = getKey(uol, run, user, propId);
EnvironmentProperty property = (EnvironmentProperty) fetchFromCache(key);
if (property == null) {
property = new EnvironmentProperty(uol, run, user, propId);
addToCache(key, property);
}
return property;
}
COM: <s> return a environment property based on the passed parameters </s>
|
funcom_train/11651781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean incFile(String text) {
// inclusion filter assumes most of
// the files are not wanted, therefore
// usefile is set to false unless it
// matches.
this.USEFILE = false;
for (int idx = 0; idx < this.INCFILE.length; idx++) {
if (text.indexOf(this.INCFILE[idx]) > -1) {
this.USEFILE = true;
break;
}
}
return this.USEFILE;
}
COM: <s> method implements the logic for filtering file name inclusion </s>
|
funcom_train/38955916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent evt) {
if (task.isCanceled()) {
cancel();
} else if (task.isDone()) {
done();
} else {
// set the progress monitor message
String s = task.getMessage();
if (s != null) {
setMessage(s);
}
progress = task.getProgress();
if (progress > 0) {
// set the progress monitor progress
// if the task is complete this method will react
setProgress(progress);
}
}
}
COM: <s> the action performed method in this class is called each time the </s>
|
funcom_train/47104618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemWeapon00() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Weapon.W_00.getItemName());
menuItem.setEnabled(true);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setPlrReadiedWeapon(Weapon.W_00);
}
});
return menuItem;
}
COM: <s> creates the first weapon choice for the weapon menu </s>
|
funcom_train/42710888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copy(Correlogram c) {
calculated = c.getCalculated();
oWeight = c.oWeight;
uWeight = c.uWeight;
decayExp = c.decayExp;
gisIO = c.gisIO;
filter = c.filter;
for( int lag = 0; lag < c.numLags; lag++) {
countArray[ lag] = c.countArray[ lag];
mean[ lag] = c.mean[ lag];
covar[ lag] = c.covar[ lag];
sdi[ lag] = c.sdi[ lag];
}
}
COM: <s> this method copies the information from one correlogram into this one </s>
|
funcom_train/4139088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enter(final Node node, final String text) throws SimpleBrowserException {
if (node instanceof HTMLInputElement) {
HTMLInputElement textComponent = (HTMLInputElement) node;
enter(textComponent, text);
} else if (node instanceof HTMLTextAreaElement) {
HTMLTextAreaElement textComponent = (HTMLTextAreaElement) node;
enter(textComponent, text);
} else {
throw new SimpleBrowserException(
"enter only works with textfield (HTMLInputElement) or textarea (HTMLTextAreaElement)");
}
}
COM: <s> enters the given text in a w3 c input node </s>
|
funcom_train/1387220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_SaveButton_Clickable() throws Throwable{
ConfirmationPage cp = (ConfirmationPage) getActivity();
final Button saveButton =
(Button) cp.findViewById(com.busstopalarm.R.id.SaveDestination);
boolean isClicked = saveButton.isClickable();
assertEquals("can't click save button", true, isClicked);
}
COM: <s> tests if the set as fav button is clickable </s>
|
funcom_train/21482654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean extractReplicateUpdatesViaCopy(Properties properties) {
boolean replicateUpdatesViaCopy;
String replicateUpdatesViaCopyString = PropertyUtil.extractAndLogProperty(REPLICATE_UPDATES_VIA_COPY, properties);
if (replicateUpdatesViaCopyString != null) {
replicateUpdatesViaCopy = PropertyUtil.parseBoolean(replicateUpdatesViaCopyString);
} else {
replicateUpdatesViaCopy = true;
}
return replicateUpdatesViaCopy;
}
COM: <s> extracts the value of replicate updates via copy from the properties </s>
|
funcom_train/18320535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showSourceFeedback(Request request) {
if (LabelMoveRequest.REQ_MOVE_OFFSET.equals(request.getType())) {
showMoveOffsetFeedback((LabelMoveRequest) request);
} else if (LabelMoveRequest.REQ_MOVE_ORIGIN.equals(request.getType())) {
showMoveOriginFeedback((LabelMoveRequest) request);
}
}
COM: <s> shows feedback when appropriate </s>
|
funcom_train/46123411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sortByName(String direction){
// This class will allow the method 'Collections.sortBy' to sort a list of 'userTD' by name
class CompareName implements Comparator<UserTD> {
private String direction;
CompareName(String direction){
this.direction = direction;
}
public int compare(UserTD userOne, UserTD userTwo){
int sortingIndice = userOne.name.compareTo(userTwo.name);
if(this.direction.equals("desc")){
return (sortingIndice * -1);
}else{
return sortingIndice;
}
}
}
Collections.sort(this.usersListTD, new CompareName(direction));
}
COM: <s> sort a list of user td by name </s>
|
funcom_train/12127265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paint(PPaintContext paintContext) {
super.paint(paintContext);
paintContext.pushClip(getBoundsReference());
paintContext.pushTransform(viewTransform);
paintCameraView(paintContext);
paintDebugInfo(paintContext);
paintContext.popTransform(viewTransform);
paintContext.popClip(getBoundsReference());
}
COM: <s> paint this camera default background color is white and then paint the </s>
|
funcom_train/11092726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepare(Message message) throws IOException {
// setup the message to be send back
Channel dc = channel;
message.put(Exchange.class, inMessage.get(Exchange.class));
NMRTransportFactory.removeUnusedInterceptprs(message);
message.setContent(OutputStream.class, new NMRDestinationOutputStream(inMessage, message, dc));
}
COM: <s> send an outbound message assumed to contain all the name value </s>
|
funcom_train/24662086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParametricCurve3D parallelTranslate(Vec3D moveVec) {
int nSeg = nSegments();
CompositeCurveSegment3D[] newSegs = new CompositeCurveSegment3D[nSeg];
for (int i = 0; i < nSeg; i++)
newSegs[i] = (CompositeCurveSegment3D)segmentAt(i).parallelTranslate(moveVec);
return new CompositeCurve3D(newSegs, periodic);
}
COM: <s> a x n g s b </s>
|
funcom_train/11343778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Dictionary cloneProperties(Dictionary dictionary){
Dictionary properties=new Hashtable();
if (dictionary == null) {
properties = new Hashtable();
} else {
Enumeration enumeration=dictionary.keys();
while(enumeration.hasMoreElements()){
Object key=enumeration.nextElement();
Object value=dictionary.get(key);
properties.put(key,value);
}
}
return properties;
}
COM: <s> clone a dictionary </s>
|
funcom_train/31208811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean nullsAreSortedHigh() throws SQLException {
try {
if(Trace.isEnabled()) Trace.trace(getId());
checkClosed();
boolean result=meta.nullsAreSortedHigh();
if(Trace.isEnabled()) Trace.traceResult(result);
return result;
} catch(Throwable e) {
throw convertThrowable(e);
}
}
COM: <s> checks is null values are sorted high bigger than any non null values </s>
|
funcom_train/47528698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws VoldemortException {
logger.debug("Close called for read-only store.");
this.fileModificationLock.writeLock().lock();
if(!isOpen)
throw new IllegalStateException("Attempt to close non-open store.");
try {
this.isOpen = false;
fileSet.close();
} finally {
this.fileModificationLock.writeLock().unlock();
}
}
COM: <s> close the store </s>
|
funcom_train/27791234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String execute(HttpServletRequest req) throws CommandException, PageException {
HttpSession session = req.getSession(false);
user = (@PROPER_NAME@UserProfileBean)session.getAttribute("user");
if (user == null)
return "index.jsp";
if (!user.isPortalAdmin())
return "index.jsp";
String action = getParameter(req, "action");
portal = @[email protected]();
if (action.equals("updateresources")) {
portal.updateContactsList();
}
return gotoPage;
}
COM: <s> admin page execute method performs various portal admin operations </s>
|
funcom_train/34029414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getNumericCellValue() {
int cellType = getCellType();
switch(cellType) {
case CELL_TYPE_BLANK:
return 0.0;
case CELL_TYPE_FORMULA:
case CELL_TYPE_NUMERIC:
return _cell.isSetV() ? Double.parseDouble(_cell.getV()) : 0.0;
default:
throw typeMismatch(CELL_TYPE_NUMERIC, cellType, false);
}
}
COM: <s> get the value of the cell as a number </s>
|
funcom_train/31678820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Complex that) {
if (this._real < that._real)
return -1;
if (this._real > that._real)
return 1;
long l1 = Double.doubleToLongBits(this._real);
long l2 = Double.doubleToLongBits(that._real);
if (l1 < l2)
return -1;
if (l2 > l1)
return 1;
if (this._imaginary < that._imaginary)
return -1;
if (this._imaginary > that._imaginary)
return 1;
l1 = Double.doubleToLongBits(this._imaginary);
l2 = Double.doubleToLongBits(that._imaginary);
if (l1 < l2)
return -1;
if (l2 > l1)
return 1;
return 0;
}
COM: <s> compares two complex numbers the real components are compared first </s>
|
funcom_train/12540946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleCoreException(CoreException exception, String message) {
Bundle bundle = Platform.getBundle(PlatformUI.PLUGIN_ID);
ILog log= Platform.getLog(bundle);
if (message != null)
log.log(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0, message, exception));
else
log.log(exception.getStatus());
}
COM: <s> handles an unanticipated code core exception code in </s>
|
funcom_train/28744316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Workflow getWorkflowByTemplate(Integer templateId) throws SimsException {
LogManager.debug("LimsDelegateImpl.getWorkflowByTemplate(): wfTemplateId-->" + templateId);
Workflow wf = this.getWorkflowTemplateById(templateId);
LogManager.printWorkflow("LimsDelegateImpl.getWorkflowByTemplate(): ", wf);
return wf;
}
COM: <s> get workflow by template id </s>
|
funcom_train/7673947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleTailRecursion() {
while (nextFunction != DONE) {
switch (nextFunction) {
case LIVE_IN_AT_STATEMENT:
nextFunction = DONE;
liveInAtStatement();
break;
case LIVE_OUT_AT_STATEMENT:
nextFunction = DONE;
liveOutAtStatement();
break;
case LIVE_OUT_AT_BLOCK:
nextFunction = DONE;
liveOutAtBlock();
break;
default:
}
}
}
COM: <s> the algorithm in appel is presented in </s>
|
funcom_train/51413374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshEventList() {
listLogEvent.refresh(MCompiereAspectLog.getAllEvents(cLogSessionPKey));
try {
Row row = MCompiereAspectLogSession.getTable().getRow(cLogSessionPKey);
treeLogEvent.setModel(new CMTreeModelCLogSessionEvents(row));
} catch (CMExceptionTableRowNotExists e) {
treeLogEvent.setModel(null);
}
}
COM: <s> refreshes the eventlist for the actual session </s>
|
funcom_train/23931890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void draw(GC gc, TreeMapNode item) {
if (item.isLeaf()) {
gc.setBackground(getColorProvider().getBackground(item.getValue()));
gc.fillRectangle(item.getBounds());
} else {
for (TreeMapNode node : item.getChildren()) {
draw(gc, node);
}
}
}
COM: <s> draw the item </s>
|
funcom_train/2441889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decorate(UiCanvas canvas) {
if (title == null && caption == null) {
prefUi.decorate(canvas);
} else {
final OneColumnPanel col = new OneColumnPanel();
col.setInsets(5, 0, 5, 0);
col.setWeightX(1.0);
layoutCaption(col);
layoutPrefUi(col);
layoutTitle(col);
col.decorate(canvas);
}
}
COM: <s> adds this layout to the given code ui canvas code </s>
|
funcom_train/40306450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRotation(float x, float z) {
float rx = m_fRotateBeginX + x;
float rz = m_fRotateBeginZ + z;
// lock the rotation below a certain degree
if ( rx > m_fMinRotation && rx < m_fMaxRotation ) m_fRotateSceneX = rx;
m_fRotateSceneZ = rz;
}
COM: <s> sets the current scene rotation relative to the locked rotation </s>
|
funcom_train/36932495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawGrid(CCGraphics g) {
for(int i = 0; i < _myX.length;i++) {
float myX = _myX[i]+ _myPosition.x;
float myY = _myY + _myPosition.y + ascent();
g.vertex(myX, myY);
g.vertex(myX, myY - _myTextSize - descent());
}
}
COM: <s> draws the text grid </s>
|
funcom_train/30075602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ModelAndView onSubmit(Object command) throws ServletException {
Client client = (Client) command;
// delegate the insert to the Business layer
getGpir().storeClient(client);
return new ModelAndView(getSuccessView(), "clientId", Integer.toString(client.getId()));
}
COM: <s> method inserts a new code client code </s>
|
funcom_train/25810251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void savePrefs() {
SharedPreferences.Editor editor = sharedPrefs.edit();
editor.putInt(getString(R.string.pref_share_project_period_key), period.getSelectedItemPosition());
String key = getString(R.string.pref_share_project_include_week_totals_key);
boolean value = includeWeekTotals.isChecked();
editor.putBoolean(
key,
value);
editor.putBoolean(
getString(R.string.pref_share_project_include_month_totals_key),
includeMonthTotals.isChecked());
editor.putBoolean(
getString(R.string.pref_share_project_group_by_day_key),
groupByDay.isChecked());
editor.commit();
}
COM: <s> stores the report selection in prefs storage </s>
|
funcom_train/25708630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBopenMsg() {
if( BopenMsg == null ) {
BopenMsg = new JButton();
BopenMsg.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(final java.awt.event.ActionEvent e) {
openSelectedMessage();
}
});
BopenMsg.setEnabled(false);
}
return BopenMsg;
}
COM: <s> this method initializes bfocus </s>
|
funcom_train/35953989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseProfiles( File sessionDataDir ) throws Exception {
this.taskStatus.setNote("Parsing templates");
final File templates = new File(sessionDataDir, "templates.xml");
if (!templates.isFile()) {
throw new IOException("No templates.xml");
}
this.profileParser.parse( new FileInputStream(templates ) );
this.taskSegment.incrementValue();
}
COM: <s> parse out all parse templates from the templates </s>
|
funcom_train/15453989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
User user = getUserByLogin(configuration.getAdministratorLogin());
if (user == null || !user.isAdministrator()) {
Transaction transaction = session.beginTransaction();
try {
createAdministratorUser(
configuration.getAdministratorName(),
configuration.getAdministratorLogin(),
configuration.getAdministratorEmail(),
null);
transaction.commit();
} catch (Exception ex) {
log.error("Error initializing administrator", ex);
transaction.rollback();
}
}
}
COM: <s> initializes the administrator user </s>
|
funcom_train/18582599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File getLastSyncTableFile() {
StringBuffer sb = new StringBuffer();
sb.append(Synchronizer.getHomeDirectory()).append(System.getProperty("file.separator"));
sb.append(LAST_SYNC_TABLE_FILENAME);
return new File(sb.toString());
} // end-method
COM: <s> retrieves the file object for the last sync table </s>
|
funcom_train/42536069 | /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(!(o instanceof MidURL))return false;
if(o == this)return true;
MidURL oo = (MidURL)o;
return (((Object)id).equals(oo.id))&&(((Object)rest).equals(oo.rest));
}
COM: <s> is the given object equal to this mid url </s>
|
funcom_train/12191529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getDatasourceConfigMap() {
HashMap ret = new HashMap();
for(Iterator it = datasourceConfigs.iterator(); it.hasNext();) {
DatasourceConfiguration config = (DatasourceConfiguration) it.next();
ret.put(config.getName(), config);
}
return ret;
}
COM: <s> get configuration parameters to create datasource </s>
|
funcom_train/29547690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshPreviewPane() {
if(previousConceptResource!=null) {
conceptAnnotationRegistry.refreshPreview(
previousConceptResource.getAnnotationContentType(),
label.getText());
} else {
cat.debug("Error: previous concept resource is null!"); // {{debug}}
}
}
COM: <s> refresh content of the preview pane there are different previews according </s>
|
funcom_train/9374222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleNotInService(int ss, SmsTracker tracker) {
if (tracker.mSentIntent != null) {
try {
if (ss == ServiceState.STATE_POWER_OFF) {
tracker.mSentIntent.send(RESULT_ERROR_RADIO_OFF);
} else {
tracker.mSentIntent.send(RESULT_ERROR_NO_SERVICE);
}
} catch (CanceledException ex) {}
}
}
COM: <s> handles outbound message when the phone is not in service </s>
|
funcom_train/7270053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setItemsChecked(Set<E> keys, boolean state) {
if (state) {
this.unchecked.removeAll(keys);
this.checked.addAll(keys);
}
else {
this.unchecked.addAll(keys);
this.checked.removeAll(keys);
}
this.update();
}
COM: <s> check or uncheck a set of items </s>
|
funcom_train/13994714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGreater() {
assertGreater(new Integer(1), new Integer(-1));
assertGreater("-4", "-10");
assertGreater(new Integer(12), "11");
assertGreater("11", new Integer(10));
assertGreater("1", null);
assertGreater("11", "");
}
COM: <s> test that greater comparisons work as excpected </s>
|
funcom_train/12385056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int writeHeader( OutputStream os, int pos ) throws IOException {
os.write( "%PDF-1.3\r".getBytes() );
os.write( 37 ); // %
os.write( 130 ); // non-ascii
os.write( 216 ); // non-ascii
os.write( 186 ); // non-ascii
os.write( 251 ); // non-ascii
os.write( 13 ); // \r
return 15;
}
COM: <s> writes pdf header to the stream </s>
|
funcom_train/3303977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void applyToStatusLine(IStatus status) {
String message= status.getMessage();
if (message.length() == 0) message= null;
switch (status.getSeverity()) {
case IStatus.OK:
setErrorMessage(null);
setMessage(message);
break;
case IStatus.WARNING:
setErrorMessage(null);
setMessage(message, WizardPage.WARNING);
break;
case IStatus.INFO:
setErrorMessage(null);
setMessage(message, WizardPage.INFORMATION);
break;
default:
setErrorMessage(message);
setMessage(null);
break;
}
}
COM: <s> applies the status to the status line of a dialog page </s>
|
funcom_train/40433320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void logElapsedTime (String uri, long startTime, Exception e) {
long millis = (new Date()).getTime() - startTime;
String msg = millis + " millis: " + uri + ((e == null) ? "" : " " + e);
this.logger.info(msg);
}
COM: <s> logs info to the logger about the elapsed time for this request </s>
|
funcom_train/41594747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAssigningAuthorityNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_II_assigningAuthorityName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_II_assigningAuthorityName_feature", "_UI_II_type"),
V3Package.eINSTANCE.getII_AssigningAuthorityName(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the assigning authority name feature </s>
|
funcom_train/10834765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassLoader getDynamicClassLoader() {
final DynamicClassLoaderManager dclm = this.classLoaderManager;
if ( dclm != null ) {
return dclm.getDynamicClassLoader();
}
// if we don't have a dynamic classloader, we return our classloader
return this.getClass().getClassLoader();
}
COM: <s> return the dynamic classloader for loading events from the repository </s>
|
funcom_train/50542125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fetchState(long timeout) throws ChannelClosedException, ChannelNotConnectedException {
boolean rc=channel.getState(null, timeout);
if(rc)
Trace.info("ReplicatedTree.fetchState()", "state was retrieved successfully");
else
Trace.info("ReplicatedTree.fetchState()", "state could not be retrieved (first member)");
}
COM: <s> fetch the group state from the current coordinator </s>
|
funcom_train/45119699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearExpandSelected(boolean sExpand, boolean sSelected) {
if (sExpand) {
TreePath rootPath = new TreePath(((TreeNode) tree.getModel().getRoot()));
expandedPaths.clear();
expandedPaths.put(getTreePathUUID(rootPath), rootPath);
}
if (sSelected) {
selectedTests = null;
lastPaths = new int[0];
}
}
COM: <s> clear the inner selected tests data and expanded paths data </s>
|
funcom_train/39532563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void emitClicked() {
JButtonEvent event = new JButtonEvent( 100, 100 );
for (Iterator it = this.listeners.iterator(); it.hasNext();) {
JButtonListener listener = (JButtonListener) it.next();
listener.clickedEvent( event );
}
}
COM: <s> method for simulating user input </s>
|
funcom_train/3290350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRelatedMMServerName() {
log.debug("Get the mmserver that runs this code.");
Enumeration e=Vwms.mmb.getInsRel().getRelated(wvmnode.getIntValue("number"),"mmservers");
if (e.hasMoreElements()) {
MMObjectNode mmserverNode = (MMObjectNode) e.nextElement();
String name = mmserverNode.getStringValue("name");
log.debug("Found mmserver: "+name);
return name;
} else {
log.error("No mmserver found!");
return null;
}
}
COM: <s> gets the first mmserver connected to this vwm </s>
|
funcom_train/18513304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void textChanged(DocumentEvent e) {
javax.swing.text.Document doc = e.getDocument();
try {
// changes the text
treeElement.setNodeValue(doc.getText(0, doc.getLength()));
} catch (BadLocationException ex) {
// should never happend
}
}
COM: <s> validates a change in the text of a jtext component </s>
|
funcom_train/14244761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void targetChanged() {
_property.targetChanged();
// update();
_target = _container.getTarget();
String oldText = getText();
String newText = _property.getProperty(_container);
TextSetter textSetter = new TextSetter(newText, this);
SwingUtilities.invokeLater(textSetter);
}
COM: <s> called when an umltext field is left </s>
|
funcom_train/26029215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean runTests(ReasonerFactory reasonerF, TestCase testcase, Resource configuration) throws IOException {
for (Iterator<String> i = listTests().iterator(); i.hasNext(); ) {
String test = i.next();
if (!runTest(test, reasonerF, testcase, configuration)) return false;
}
return true;
}
COM: <s> run all the tests in the manifest </s>
|
funcom_train/22536579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getCCAdapter() throws MalformedURLException, ServiceException, RemoteException {
String response = ""; //$NON-NLS-1$
DispatcherServiceLocator service = new DispatcherServiceLocator();
DispatcherWS port = service.getDispatcher(new URL(fDispatcherURL));
doAuth(port);
response = (String) port.getAdapterWebServiceURI("org.coppercore.ccsi.adapter.ld"); //$NON-NLS-1$
return response;
}
COM: <s> method to get the specific copper core adapter endpoint </s>
|
funcom_train/11097024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void installArchive(String archive) {
try {
ArchiveEntry entry = jbiContainer.getAutoDeploymentService().updateExternalArchive(archive, true);
archiveMap.put(archive, entry);
} catch (DeploymentException e) {
throw new RuntimeException(
"ServiceMix JBIContainer unable to install archive ["
+ archive + "]", e);
}
}
COM: <s> request the jbi container install the given archive </s>
|
funcom_train/4649084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRoleModule(long roleId, String[] module){
StringBuffer sb = new StringBuffer();
getRoleModuleDao().deleteModule(roleId);
if(module != null){
for(int i = 0; i<module.length; i++){
if(i == module.length - 1){
sb.append(module[i]);
}
else{
sb.append(module[i]).append(",");
}
}
getRoleDao().addModule(new RoleModule(roleId, sb.toString()));
}
}
COM: <s> role id function </s>
|
funcom_train/5662759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEndDatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Employment_endDate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Employment_endDate_feature", "_UI_Employment_type"),
ResumePackage.eINSTANCE.getEmployment_EndDate(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the end date feature </s>
|
funcom_train/42709609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOidoCommand() {
if (oidoCommand == null) {//GEN-END:|40-getter|0|40-preInit
// write pre-init user code here
oidoCommand = new Command("O\u00EDdo", Command.ITEM, 0);//GEN-LINE:|40-getter|1|40-postInit
// write post-init user code here
}//GEN-BEGIN:|40-getter|2|
return oidoCommand;
}
COM: <s> returns an initiliazed instance of oido command component </s>
|
funcom_train/3363257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaximum(int n) {
int newMin = Math.min(n, min);
int newExtent = Math.min(n - newMin, extent);
int newValue = Math.min(n - newExtent, value);
setRangeProperties(newValue, newExtent, newMin, n, isAdjusting);
}
COM: <s> sets the maximum to i n i after ensuring that i n i </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.