__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/9994159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetStufe() throws AssertionFailedException {
System.out.println("getStufe");
Database instance = new Database();
String expResult_1 = "";
String result_1 = instance.getStufe();
assertEquals(expResult_1, result_1);
fail("The test case is a prototype.");
}
COM: <s> test of test get stufe method of class database </s>
|
funcom_train/33772689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePermission(String label) throws SQSException {
Map<String, String> params = new HashMap<String, String>();
params.put("Label", label);
GetMethod method = new GetMethod();
try {
RemovePermissionResponse response =
makeRequestInt(method, "RemovePermission", params, RemovePermissionResponse.class);
} finally {
method.releaseConnection();
}
}
COM: <s> removes a permission from this message queue </s>
|
funcom_train/11782774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPerPosValToVelma(ArrayList<PerPositionValue> dvfList, VelmaBank velmaBank) {
this.posData = velmaBank.registerDataVal(header, data.length);
for (int i = 0; i < header.length; i++) {
double d[] = new double[data.length];
for (int j = 0; j < data.length; j++)
d[j] = data[j][i];
dvfList.add(new PerPositionValue(header[i], d));
}
}
COM: <s> adds values of this instance to the list and the bank </s>
|
funcom_train/25437044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init(HashMap<Planet, ArrayList<Planet>> accessiblePlanets) {
if (this.AI != null) {
this.accessiblePlanets = accessiblePlanets;
this.lastTime = System.currentTimeMillis() + this.aiWaitBeforePlay;
//Log.d("Player", "Init() this.lastTime=" + this.lastTime);
}
}
COM: <s> give level information to the ia </s>
|
funcom_train/38643814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleEvent(final Event event) {
int maskNoButton = (event.stateMask & ~SWT.BUTTON_MASK);
if (maskNoButton != 0) {
return;
}
TableColumnOrTreeColumn column = TableOrTreeUtils.getTableColumnEventItem(event.widget);
if (column == null) {
return;
}
TableColumnCore tableColumnCore = (TableColumnCore) column.getData("TableColumnCore");
if (tableColumnCore != null) {
sortColumnReverse(tableColumnCore);
columnVisibilitiesChanged = true;
refreshTable(true);
}
}
COM: <s> process a table header click </s>
|
funcom_train/23236398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void logPlayer(String name, RPObject object) throws SQLException {
int age = -1;
String release = "0.0";
if (object.has("age")) {
age = object.getInt("age");
}
if (object.has("release")) {
release = object.get("release");
}
ps.setDate(1, date);
ps.setString(2, name);
ps.setInt(3, age);
ps.setString(4, release);
ps.executeUpdate();
}
COM: <s> logs a player </s>
|
funcom_train/40669393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort(JMethod[] methods) {
Arrays.sort(methods, new Comparator<JMethod>() {
public int compare(JMethod m1, JMethod m2) {
String name1 = m1.getName();
String name2 = m2.getName();
return name1.compareTo(name2);
}
});
}
COM: <s> convenience method to sort methods in a consistent way </s>
|
funcom_train/38830812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getColumn(final List<String> row) throws CSVIgnoreRow {
try {
String value = row.get(column);
if (enableIgnore && value.equalsIgnoreCase("ignore")) {
throw new CSVIgnoreRow();
}
return value;
} catch (IndexOutOfBoundsException e) {
throw new InvalidCSVFormatError("No element " + column + " in "
+ row);
}
}
COM: <s> the specializing filter should use this method or the string ignore may </s>
|
funcom_train/1600659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int index){
if(index == -1 || index >= objectsSize) return;
selected.remove(objects[index]);
int selectedIndex = selected.getIndex(objects[index]);
objects[index] = objects[(objectsSize--)-1];
//System.out.println(this.toString());
}
COM: <s> method for removing a gdrawable object by index reference </s>
|
funcom_train/45737026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TargetLanguage getTargetLanguage() throws OdbgenException {
String tlString = this.getOption(OdbGen.Option.TARGETLANGUAGE);
TargetLanguage tl;
try{
tl = Enum.valueOf(TargetLanguage.class, tlString);
}
catch(IllegalArgumentException e){
throw new OdbgenException(
e,
"The language '%s' is not supported.",
tlString
);
}
return tl;
}
COM: <s> returns the target language according to options </s>
|
funcom_train/1591177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDate(final ReadableInstant instant) {
long instantMillis = DateTimeUtils.getInstantMillis(instant);
Chronology instantChrono = DateTimeUtils.getInstantChronology(instant);
DateTimeZone zone = instantChrono.getZone();
if (zone != null) {
instantMillis = zone.getMillisKeepLocal(DateTimeZone.UTC, instantMillis);
}
setDate(instantMillis);
}
COM: <s> set the date from another instant </s>
|
funcom_train/23310498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int compareForNulls(Object o1, Object o2) {
if(o1 == null && o2 == null) return 0;
if(o1 == null) {
if(nullIsGreater) return 1;
else return -1;
}
else if(o2 == null) {
if(nullIsGreater) return -1;
else return 1;
}
else {
return 0; // both are non-null;
}
}
COM: <s> this method will establish the ordering for two objects when </s>
|
funcom_train/47021910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCancelCommand() {
if (cancelCommand == null) {//GEN-END:|196-getter|0|196-preInit
// write pre-init user code here
cancelCommand = new Command(getLocalizedString("Cancel"), Command.CANCEL, 0);//GEN-LINE:|196-getter|1|196-postInit
// write post-init user code here
}//GEN-BEGIN:|196-getter|2|
return cancelCommand;
}
COM: <s> returns an initiliazed instance of cancel command component </s>
|
funcom_train/13753273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void breakLine() {
isLineReady = true;
isInLineBreak = false;
// queue an empty line prepend request if one exists
prependEmptyLine = isPrependPostBlockEmptyLineRequested;
readyFormattedLine = formattedLine.toString();
if (isAppendPostBlockEmptyLineRequested) {
isAppendPostBlockEmptyLineRequested = false;
isPrependPostBlockEmptyLineRequested = true;
} else {
isPrependPostBlockEmptyLineRequested = false;
}
formattedLine = new StringBuffer();
}
COM: <s> register a line break for the formatted line </s>
|
funcom_train/31056356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendAgentMessage( Object sender, String message, Agent from, Agent to ) {
// if the destination of this message is not on our system,
// then forget it being displayed
if( !myCell.isAgentLocal( to ) )
return;
notifySubscribers( new AgentMessageCellEvent( this, getCount(), from, to, message ) );
}
COM: <s> tell subscribes that an agent is messaging another </s>
|
funcom_train/14215920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getYear() {
String myWert=this.year;
String myFieldName="year";
if(this.getUserObject().isEditor()){
return "<input type=\"input\" name=\""+myFieldName+"\" size=\""+this.editFieldWidth+"\" value=\""+myWert+" \">";
}else{
return myWert;
}
}
COM: <s> returns the year </s>
|
funcom_train/24316259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putAll(Map t) {
Iterator iter = t.entrySet().iterator();
while(iter.hasNext()) {
Map.Entry entry = (Map.Entry)iter.next();
this.put(entry.getKey(), entry.getValue());
}
}
COM: <s> adds all the mappings in the specified map to this map replacing any </s>
|
funcom_train/51245906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNewRowPanel(final Vector children) {
int index = mainPanel.getComponentCount() - 1;
if (index >= 0) {
FieldsRowPanel prev = (FieldsRowPanel)
mainPanel.getComponent(index);
if (prev != null) {
prev.addConjunction();
}
}
super.addNewRowPanel(children);
}
COM: <s> adds a new fields row panel representing a boolean expression </s>
|
funcom_train/40118924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void performTriggerAnalysis() throws BuildException {
try {
Path destPath = new Path(this.getProject(), destdir.getAbsolutePath());
Analyzer analyzer = new Analyzer(destPath.list(),
classpath.list(),
scratchdir,
verboseTriggerAnalysis);
analyzer.analyze();
}
catch (Throwable t) {
throw new BuildException(t);
}
}
COM: <s> performs the trigger analysis </s>
|
funcom_train/39291854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TProcess getProcess() {
try {
EList l = resource.getContents();
Iterator i = l.iterator();
while (i.hasNext()) {
Object o = i.next();
if (o instanceof DocumentRoot) {
DocumentRoot rootObject = (DocumentRoot) o;
process = rootObject.getProcess();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return process;
}
COM: <s> returns the workflow used by this editor </s>
|
funcom_train/45223388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton makeMonthTitle(String week) {
// JPanel newDay = new JPanel();
JButton dateButton = new JButton();
dateButton.setPreferredSize(preferredSizeDayTitle);
dateButton.setText(week);
dateButton.setFont(f1);
dateButton.setEnabled(false);
// newDay.setBorder(loweredbevel);
// newDay.setPreferredSize(preferredSizeMonthTitle);
// newDay.add(dateButton);
return dateButton;
}
COM: <s> make month title </s>
|
funcom_train/22155674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String txy(int x,int y) {
int nx=x, ny=y;
int mw = media.width;
int mh = media.height;
// handle any translations
x+=trax;
y+=tray;
switch(mediaRot)
{
case 0:
// Portrait
//nx = x;
ny = mh - y;
break;
case 90:
// Landscape
//nx = y;
//ny = x;
nx = x;
ny = -y;
break;
case 180:
// Inverse Portrait
// to be completed
nx = mw - x;
//ny = y;
break;
case 270:
// Seascape
// to be completed
nx = mw - y;
ny = mh - x;
break;
}
return ""+nx+" "+ny+" ";
}
COM: <s> converts the java space coordinates into pdf text space </s>
|
funcom_train/4443358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void show(Widget box) {
// Set the position of the pop-up right before it is shown.
this.setPopupPositionAndShow(new PositionOnWidgetCallback(box) {
public void setPosition(int offsetWidth, int offsetHeight) {
SuggestionsPopup.adjustPopUpPosition(offsetWidth, offsetHeight,
this.widget, SuggestionsPopup.this);
}
});
}
COM: <s> the default position of the suggest popup is directly below the </s>
|
funcom_train/45064860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToolBar getMoreToolBar() {
if (moreToolBar == null) {
moreToolBar = new JToolBar();
moreToolBar.setFloatable(false);
moreToolBar.setComponentOrientation(java.awt.ComponentOrientation.LEFT_TO_RIGHT);
moreToolBar.setBorderPainted(true);
moreToolBar.add(getConnectButton());
moreToolBar.add(getOpenModelButton());
moreToolBar.add(getDeleteButton());
moreToolBar.setRollover(true);
}
return moreToolBar;
}
COM: <s> this method initializes more tool bar </s>
|
funcom_train/51002905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void enforcePopulationCap() {
mNumIndividuals = mIndividuals.size();
while( mNumIndividuals > mPopulationCap ) {
// pick an individual at random
int indivIndex =
(int)( mRandom.nextDouble() * ( mNumIndividuals ) );
if( indivIndex == mNumIndividuals ) {
indivIndex--;
}
mIndividuals.remove( indivIndex );
mNumIndividuals = mIndividuals.size();
}
}
COM: <s> enforces the populatio cap </s>
|
funcom_train/27820420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object ob) {
if (this == ob) {
return true;
}
if (!(ob instanceof Node)) {
return false;
}
Node tob = (Node) ob;
if (id != null) {
if (tob.id == null) {
return false;
}
if (!id.equals(tob.id)) {
return false;
}
} else {
if (tob.id != null) {
return false;
}
}
return true;
}
COM: <s> nodes are identical when their ids are identical </s>
|
funcom_train/17458251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean enableOutput(MPDOutput output) throws MPDConnectionException, MPDResponseException {
MPDCommand command = new MPDCommand(prop.getProperty(MPDPROPOUTPUTENABLE), Integer.toString(output.getId()));
fireOutputChangeEvent(OutputChangeEvent.OUTPUT_EVENT.OUTPUT_CHANGED);
return mpd.sendMPDCommand(command).isEmpty();
}
COM: <s> enables the passed </s>
|
funcom_train/181258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deletePersistent(java.lang.Object pc) {
try {
DbObject object = (DbObject)pc;
evict(object);
execute(DbQueryBuilder.createRemoveObject(object));
} catch(Throwable e) {
throw new UserException(ResourceManager.getResource(DbObjectServer.class, "CW_DeletionError"), ResourceManager.getResource(DbObjectServer.class, "CT_DeletionError"), e);
}
}
COM: <s> delete the persistent instance from the data store </s>
|
funcom_train/20232465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initFrame() {
editorFrame = new JFrame();
editorFrame.setTitle(UiConstants.MAIN_WINDOW_TITLE);
editorFrame.setSize(new Dimension(UiConstants.WINDOW_WIDTH,
UiConstants.WINDOW_HEIGHT));
editorFrame.addWindowListener(new EditorFrameListener(model, editorFrame));
editorFrame.addComponentListener(new DividerListener(this));
// Set to exit when we close the frame
editorFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
}
COM: <s> set up the main window frame </s>
|
funcom_train/46427908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public String toStringWithPremises(String indentation) {
// String result = indentation + toString() + "\n";
// if (_premise1 != null) {
// result = result + _premise1.toStringWithPremises(indentation + " ");
// }
// if (_premise2 != null) {
// result = result + _premise2.toStringWithPremises(indentation + " ");
// }
// return result;
// }
COM: <s> to display the premises used to derive a judgment </s>
|
funcom_train/16912847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double atan(final double input, Neuron neuron) {
double upperBound = neuron.getUpperBound();
double lowerBound = neuron.getLowerBound();
double a = (Math.PI * slope) / (upperBound - lowerBound);
return ((upperBound - lowerBound) / Math.PI) * Math.atan(a * input)
+ ((upperBound + lowerBound) / 2);
}
COM: <s> returns the result of the arctangent function </s>
|
funcom_train/42868453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void jumpLabel(String label) throws IOException {
//TODO:
if (!labelStack.isEmpty()) {
while ((!labelStack.isEmpty()) && labelStack.peek().equals(label)) {
labelStack.pop();
indent--;
indent();
writer.write("}\n\n");
}
}
COM: <s> target label for a jump this method call immediately precedes the </s>
|
funcom_train/33942996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContactFilter(int filter) {
// Set the label with the filter string
filterLabel.setText(Data.INSTANCE.getContacts().getDatasetById(filter).getName(false));
filterLabel.pack(true);
// Reset transaction and category filter, set contact filter
contentProvider.setContactFilter(filter);
contentProvider.setTransactionFilter(-1);
contentProvider.setCategoryFilter("");
// Reset the addNew action.
if (addNewAction != null) {
addNewAction.setCategory("");
}
this.refresh();
}
COM: <s> set the contact filter </s>
|
funcom_train/7446136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long insert(BalanceLog dto) {
Connection conn = null;
try {
// get the user-specified connection or get a connection from the
// ResourceManager
conn = ResourceManager.getConnection(TRACE_ID);
//return insert(dto, conn);
} catch (SQLException _e) {
_e.printStackTrace();
// throw _e;
} catch (Exception _e) {
_e.printStackTrace();
// throw new SQLException( "Exception: " + _e.getMessage());
} finally {
ResourceManager.freeConnection(conn);
}
return -1;
}
COM: <s> inserts a new row in the balance log table </s>
|
funcom_train/36061540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String changePasswordToRandom( int userId, int newPasswordLength ) throws NoDatabaseConnectionException, SQLException, InputValidationException, NoSuchAlgorithmException{
String newPassword = LocalPasswordAuthentication.generateRandomPassword( newPasswordLength );
if( changePassword( userId, newPassword ) ){
return newPassword;
}
else{
return null;
}
}
COM: <s> resets the password to a new value that is randomly generated </s>
|
funcom_train/23833437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadData(String url, OutputStream outputStream) {
try {
semwebClient.loadURL(new org.apache.commons.httpclient.URI(url, true), true /* wait */);
} catch (URIException e) {
e.printStackTrace();
} catch (NullPointerException e) {
e.printStackTrace();
}
PrintWriter writer = new PrintWriter(outputStream);
writer.print("ok");
writer.close();
}
COM: <s> re loads an url into the cache code load code </s>
|
funcom_train/23632034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasEvents( SimpleDate date ) {
boolean i = false;
if( days[date.day].getText().length() > 2 ){
//obviously, if the text has more than two characters(I.E. more data in the field
//than just the date), there has to be an event.
i = true;
}else{
i = false;
}
return i;
}
COM: <s> detects whether there is an event on the month view </s>
|
funcom_train/18367248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void firePropertyChange(String changeId, Object oldValue, Object newValue) {
final PropertyChangeEvent event = new PropertyChangeEvent(this, changeId, oldValue, newValue);
Display.getDefault().syncExec(new Runnable() {
public void run() {
Object[] listeners = propertyChangeListeners.getListeners();
for (int i = 0; i < listeners.length; i++) {
((IPropertyChangeListener) listeners[i]).propertyChange(event);
}
}
});
}
COM: <s> notify property change listeners about a change to the list of </s>
|
funcom_train/50865483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateSiteNumbers() {
navLayer.clearNavpointPositions();
for (int x = 0; x < siteListPane.getComponentCount(); x++) {
SitePanel sitePane = (SitePanel) siteListPane.getComponent(x);
sitePane.setSiteNum(x);
navLayer.addNavpointPosition(MapUtils.getRectPosition(sitePane.getSite(), getCenterCoords(), SurfMarsMap.TYPE));
}
mapPane.repaint();
}
COM: <s> updates the exploration site numbers </s>
|
funcom_train/46453713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cross(Vec3D v1, Vec3D v2) {
double x, y;
x = v1.y*v2.z-v1.z*v2.y;
y = v2.x*v1.z-v2.z*v1.x;
this.z = v1.x*v2.y-v1.y*v2.x;
this.x = x;
this.y = y;
}
COM: <s> sets this vector to the vector cross product of vectors v1 and v2 </s>
|
funcom_train/35406321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String stem(String word) {
// add word characters into buffer
char[] chars = word.trim().toLowerCase().toCharArray();
for(int i=0; i < chars.length; i++) {
if (Character.isLetter((char)chars[i])) {
this.add(chars[i]);
}
}
k = i - 1;
if (k > 1) {
step1();
step2();
step3();
step4();
step5();
step6();
}
i_end = k + 1;
i = 0;
return this.toString();
}
COM: <s> stem the word placed into the stemmer buffer through calls to add </s>
|
funcom_train/3634759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D getPoint(int index) {
Object obj = points.get(index);
if (obj instanceof PortView)
// Port Location Seen From This Edge
return ((PortView) obj).getLocation(this);
else if (obj instanceof CellView) {
// Should not happen
Rectangle2D r = ((CellView) obj).getBounds();
return getAttributes().createPoint(r.getX(), r.getY());
} else if (obj instanceof Point2D)
// Regular Point
return (Point2D) obj;
return null;
}
COM: <s> returns the cached points for this edge </s>
|
funcom_train/26098515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTable getTableTest() {
if (tableTest == null) {
tableTest = new JTable();
tableTest.setModel(getCategoryTableModel());
tableTest.setRowHeight(18);
tableTest.setIntercellSpacing(new Dimension(1, 1));
for (int i = 0; i < 2; i++) {
TableColumn column = tableTest.getColumnModel().getColumn(i);
column.setPreferredWidth(width[i]);
}
}
return tableTest;
}
COM: <s> this method initializes table test </s>
|
funcom_train/19437027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTimeMode(WatchInfo downloadedWatchInfo) {
if (downloadedWatchInfo.getTime1Mode() == 12) {
time1Mode.select(0);
} else {
time1Mode.select(1);
}
if (downloadedWatchInfo.getTime2Mode() == 12) {
time2Mode.select(0);
} else {
time2Mode.select(1);
}
}
COM: <s> 12 or 24 mode </s>
|
funcom_train/15411098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
if (ShutdownManager.isStopping()) {
return;
}
while (!stopped) {
try {
long actualSleep = sleepTime - exeTime;
if (actualSleep < 0) {
actualSleep = sleepTime;
}
Thread.sleep(actualSleep);
synchronized (monitor) {
runJobs();
}
} catch (InterruptedException e) {
logger.log(Level.SEVERE, null, e);
}
}
// Tell Stop() we have shut ourselves down successfully
synchronized (threadMonitor) {
threadMonitor.notifyAll();
}
}
COM: <s> run the registered tasks periodically </s>
|
funcom_train/2603919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Complex div(Complex b) {
// Adapted from Numerical Recipes in C - The Art of Scientific Computing
// ISBN 0-521-43108-5
double resRe, resIm;
double r, den;
if (Math.abs(b.re) >= Math.abs(b.im)) {
r = b.im/b.re;
den = b.re + r*b.im;
resRe = (re+r*im)/den;
resIm = (im-r*re)/den;
} else {
r = b.re/b.im;
den = b.im + r*b.re;
resRe = (re*r+im)/den;
resIm = (im*r-re)/den;
}
return new Complex(resRe, resIm);
}
COM: <s> returns the result of dividing this complex number by the parameter </s>
|
funcom_train/36198875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SMS getSms(int index) throws Exception {
if (driver == null) {
throw new Exception("Driver not set");
}
if (waitBusy()) {
throw new ModemBusyException("Modem is already executing command");
}
busy = true;
try {
return driver.getSms(this, index);
} finally {
busy = false;
}
}
COM: <s> retrieves sms from the modem </s>
|
funcom_train/47732528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enables(final String item, final Component c) {
if (c.isEnabled()) {
c.setEnabled(getSelectedItem().equals(item));
addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
c.setEnabled(getSelectedItem().equals(item));
}
});
}
}
COM: <s> enables otherwise disables the supplied component if this item is </s>
|
funcom_train/13803989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Class getClass(String name) {
if( initialized == false ) {
instanceInitialize(null,null,null);
initialized = true;
}
for( int i = 0; i < extensions.length; i++ ) {
if( extensions[i].matches(name) ) {
return extensions[i].theClass;
}
}
return null;
}
COM: <s> get an object class based on its name </s>
|
funcom_train/50078912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReferences() {
ConfigurationFormatServiceTest
.config
.setSubConfigurationRef(
(Config.getInstance().fetchConfiguration(TEST_TOKEN_LOCATION)));
assertTrue(
"Reference to original configuration was not maintained",
ConfigurationFormatServiceTest
.config
.getSubConfigurationRef()
.getConfigurationName()
.equals(TEST_TOKEN_LOCATION));
}
COM: <s> this tests the configuration of a configuration reference </s>
|
funcom_train/12567800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean IsToday(GregorianCalendar date){
boolean dateIsToday = false;
GregorianCalendar today = new GregorianCalendar();
today.set(Calendar.HOUR_OF_DAY, 0);
today.set(Calendar.MILLISECOND, 0);
today.set(Calendar.MINUTE, 0);
today.set(Calendar.SECOND, 0);
if (today.equals(date))
{
dateIsToday = true;
}
return dateIsToday;
}
COM: <s> is the given date today </s>
|
funcom_train/12222296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() throws InvalidTupleOperationException {
if (value.isStruct()){
return ((Struct)value).getName();
} else if (value.isVar()){
return ((alice.tuprolog.Var)value).getName();
} else {
throw new InvalidTupleOperationException();
}
}
COM: <s> gets the name of this argument supposed to be a structure </s>
|
funcom_train/27675718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getIntChar() {
try {
if ( savedChar == -2 ) {
int c = reader.read();
return c;
} else {
int x = savedChar;
savedChar = -2;
return x;
}
} catch ( IOException ex ) {
throw(
Alerts.parse(
"Could not read from input source",
null
).culprit( "message", ex.getMessage() ).mishap()
);
}
}
COM: <s> returns the integer value of the next character from this tokenizers </s>
|
funcom_train/23747731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fadeRightMouseDragged(java.awt.event.MouseEvent evt)//GEN-FIRST:event_fadeRightMouseDragged
{//GEN-HEADEREND:event_fadeRightMouseDragged
if((evt.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) != MouseEvent.BUTTON3_DOWN_MASK)
{
offsetPanels();
}
}//GEN-LAST:event_fadeRightMouseDragged
COM: <s> called when dragging the mouse on the right transparency panel under </s>
|
funcom_train/51783680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPublicIPAddress(Inet4Address addr) {
if(getOp() != 128)
throw new IllegalStateException("This packet does not have a public IP field!");
buf.put(8, addr.getAddress()[0]);
buf.put(9, addr.getAddress()[1]);
buf.put(10,addr.getAddress()[2]);
buf.put(11,addr.getAddress()[3]);
}
COM: <s> only valid if the op code is 128 </s>
|
funcom_train/10928042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeProperty(String id) {
if (id == null) {
return;
}
Iterator<PropertyData<?>> iterator = propertyList.iterator();
while (iterator.hasNext()) {
PropertyData<?> property = iterator.next();
if (id.equals(property.getId())) {
iterator.remove();
break;
}
}
properties.remove(id);
}
COM: <s> removes a property </s>
|
funcom_train/43887548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SimpleFeature create(SimpleFeatureType type, List values, String fid) {
builder.init();
builder.setType(type);
for (int i = 0; i < values.size(); i++) {
builder.add(values.get(i));
}
return builder.feature(fid);
}
COM: <s> creates a new simple feature from a type and list of values </s>
|
funcom_train/47675055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDeclaration(String decl) {
if (decl.equals(StructureAttributes.P_OPTIONAL) || decl.equals(StructureAttributes.P_REQUIRED)) {
this.declaration = decl;
} else {
throw new IllegalArgumentException("The argument for setDeclaration may only be StructureAttributes.REQUIRED or StructureAttributes.OPTIONAL!");
}
}
COM: <s> set the declaration of this attribute </s>
|
funcom_train/27862130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseMoved(double x, double y,int buttonMask) {
owner.ged.mouseMoved(x,y);
if(locked)return;
currentwindow = detectWindow();
int[] p = unproject();
if(p!=null&& testRight())
((MasterViewer) viewer).getBouncer().handleMouse(p[0],p[1],buttonMask,p[2]);
}
COM: <s> mouse moved callback </s>
|
funcom_train/15399206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PartialTimestamp (int year, int month, int date, int hour, int minute) {
this (TimeZone.getDefault (), Locale.getDefault ());
this.set (YEAR, year);
this.set (MONTH, month);
this.set (DATE, date);
this.set (HOUR_OF_DAY, hour);
this.set (MINUTE, minute);
}
COM: <s> constructs a gregorian calendar with the given date </s>
|
funcom_train/44011555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCustCity() {
System.out.println("setCustCity");
String custCity = "";
CustomerBO instance = null;
instance.setCustCity(custCity);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set cust city method of class edu </s>
|
funcom_train/18467048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File checkExtension(File name, String extension) {
String lowName = name.getName().toLowerCase();
String lowExt = "."+extension.toLowerCase();
if( lowName.indexOf(lowExt) > 0 ) {
//ok, no change
return name;
}
//add extension
return new File(""+name+lowExt);
}
COM: <s> checks if the given file name contains the given extension string </s>
|
funcom_train/40851397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPercSelfpick() {
if(this.getNbGames()==null || this.getNbGames().intValue()==0) return "N/A";
double perc = ((double)this.getNbSelfpick().intValue()) / this.getNbGames().intValue();
return NumberUtils.getPrettyPrintForm(perc * 100) + "%";
}
COM: <s> return a pretty print form of the percentage of selfpick games </s>
|
funcom_train/36655626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepare() {
if (getRequest().getMethod().equalsIgnoreCase("post")) {
// prevent failures on new
String titleId = getRequest().getParameter("title.id");
if (titleId != null && !titleId.equals("")) {
title = titleManager.get(new Long(titleId));
}
}
}
COM: <s> grab the entity from the database before populating with request parameters </s>
|
funcom_train/19454199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setColumnSelection() {
if(acceptMarkingOfSeveralColumns) {
if(acceptMarkingOfSeveralRows) {
this.setCellSelectionEnabled(true);
}
this.setColumnSelectionAllowed(true);
ListSelectionModel columnModel = this.getColumnModel().getSelectionModel();
columnModel.addListSelectionListener(
new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if(e.getValueIsAdjusting()) {
return;
}
}
});
}
}
COM: <s> sets the column selection attribute of the abstract tm table object </s>
|
funcom_train/19765676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getFlashCmd() {
if (flashCmd == null) {//GEN-END:|58-getter|0|58-preInit
// write pre-init user code here
flashCmd = new Command("\u5237\u65B0", Command.SCREEN, 0);//GEN-LINE:|58-getter|1|58-postInit
// write post-init user code here
}//GEN-BEGIN:|58-getter|2|
return flashCmd;
}
COM: <s> returns an initiliazed instance of flash cmd component </s>
|
funcom_train/4916672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClassNotAdministratorSource() {
// Record no administrator source
this.recordReturn(this.configuration,
this.configuration.getAdministratorName(), "ADMIN");
this.recordReturn(this.configuration,
this.configuration.getAdministratorSourceClass(), Object.class);
this.issues.addIssue(this.assetType, this.assetName,
"Administrator 'ADMIN' class must implement AdministratorSource (class="
+ Object.class.getName() + ")");
// Construct the administrators
this.replayMockObjects();
this.constructRawAdministrator(0, this.configuration);
this.verifyMockObjects();
}
COM: <s> ensures issue if class not </s>
|
funcom_train/46762077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void consume(Object o) {
try {
long startTime = DateTimeModel.getNowInMS();
process.consume(o);
// increment status
long stopTime = DateTimeModel.getNowInMS();
if (stopTime > startTime) {
status.incrementTotalProcessingTime(stopTime - startTime);
}
status.incrementMessagesProcessed();
status.checkSetPeakQueueSize(queue.size());
currentWait = 0; // while busy, stay busy
} catch (Exception ex) {
Log.exception(ex);
status.incrementMessageErrors();
}
}
COM: <s> consume the object </s>
|
funcom_train/19398164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_splitRootLeaf_increasingKeySequence() {
int[] branchingFactors = new int[]{3,4,5};// 6,7,8,20,55,79,256,512,1024,4097};
COM: <s> a stress test for sequential key insertion that runs with a variety of </s>
|
funcom_train/25289716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getPlaneS(Vector4f planeS) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_PLANE_READ))
throw new CapabilityNotSetException(Ding3dI18N.getString("TexCoordGeneration4"));
((TexCoordGenerationRetained)this.retained).getPlaneS(planeS);
}
COM: <s> retrieves a copy of the plane equation used to </s>
|
funcom_train/9766229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSliderOnly(float value) {
boolean store = instantView.isSelected();
instantView.setSelected(false);
changeAngle.setValueIsAdjusting(true);
float max = changeAngle.getMaximum();
changeAngle.setValue( (int) ( (value + 180.0f) / 360.0f * max));
changeAngle.setValueIsAdjusting(false);
instantView.setSelected(store);
}
COM: <s> values should be always within 180 180 interval </s>
|
funcom_train/13481734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InCell2 combine(ANNCell b,CauchyDistribution cdf,double[] mp) {
return new InCell2(CList.combine(this.forward_connections,b.forward_connections,cdf,mp,this.nodes,this.in),this.nodes,this.in);
}
COM: <s> to do combining cells </s>
|
funcom_train/36177257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getRadius() {
double radius = 0.0D;
if (centroid != null) {
for (String docName : docNames) {
RealMatrix doc = getDocument(docName);
radius += doc.subtract(centroid).getFrobeniusNorm();
}
}
return radius / docNames.size();
}
COM: <s> returns the radius of the cluster </s>
|
funcom_train/12592212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable query(String indexName, String queryString, String queryDefaultField, Vector resultFields, int hitOffset, int hitCount) throws XmlRpcException {
return query(indexName, queryString, queryDefaultField, resultFields, hitOffset, hitCount, "", 0, "", "", "");
}
COM: <s> return index search results based on a query string </s>
|
funcom_train/35171206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveJComponent(String filename, int type, JComponent component) {
Dimension size = component.getSize();
BufferedImage image = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
Graphics2D grp = image.createGraphics();
component.paint(grp);
if (type == PNG) {
filename += PNG_EXTENSION;
this.savePNGWithBatik(filename, image);
} else if (type == TIFF) {
filename = filename + TIFF_EXTENSION;
this.saveTIFFWithBatik(filename, image);
}
}
COM: <s> method will save the jcomponent as an image </s>
|
funcom_train/26587699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setQName(String QName){
String[] pieces= breakQName(QName);
if (pieces[0]==null) {
if (pieces[1].equals("xmlns")) {
name="";
}
} else {
if (pieces[0].equals("xmlns")){
name=pieces[1];
} else {
}
}
}
COM: <s> if the qname is xmlns </s>
|
funcom_train/4745319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteSecurityGroup(String name) {
// initialize the interface
Jec2 ec2 = new Jec2(getCredentials().getAwsAccessKeyId(),
getCredentials().getSecretAccessKey());
try {
ec2.deleteSecurityGroup(name);
return true;
} catch (Exception ex) {
Logger logger = Logger.getLogger(this.getClass().getName());
logger.log(Level.SEVERE, "Deleting security group failed: "
+ ex.getMessage());
return false;
}
}
COM: <s> delete a security group </s>
|
funcom_train/50961540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showAllCols() {
try {
colsToDisplay = new int[rs.getMetaData().getColumnCount()];
for (int i = 0; i<rs.getMetaData().getColumnCount(); i++)
colsToDisplay[i]=i+1;
} catch (Exception e) {
System.err.println("Error calculating columns: "+e.getMessage());
}
}
COM: <s> configure the object to show all the columns </s>
|
funcom_train/46152212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPlaying() {
boolean playing = false;
if (playerReady()) {
// ask the player for the play state, this has the most
// accurate status of what the user is seeing
logger.finest("video player: is playing == " + playing + " (" + snapper.getPlayerState() + ")");
playing = snapper.getPlayerState() == Player.Started;
}
return playing;
}
COM: <s> gets whether the player is currently playing </s>
|
funcom_train/45026310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endMethodTest(IDDTTestCase test, String methodName) {
for (Iterator e = cloneListeners().listIterator(); e.hasNext();) {
TestListener listener = (TestListener) e.next();
if (DDTTestListener.class.isInstance(listener)) {
((DDTTestListener) listener).endMethodTest(test, methodName);
}
}
}
COM: <s> notify about end of method test </s>
|
funcom_train/21827879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object createConnectionFactory(ConnectionManager connectionManager) throws ResourceException {
System.out.println("[ManagedConnectionFactory] -> createConnectionFactory(ConnectionManager connectionManager)...");
m_connectionManager = connectionManager;
ConnectionFactory connectionFactory = new ConnectionFactoryImpl(m_connectionManager, this);
return connectionFactory;
}
COM: <s> the method create connection factory creates a connection factory instance </s>
|
funcom_train/20476223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkState() {
boolean valid = true;
m_invalidFieldEditor = null;
// The state can only be set to true if all
// field editors contain a valid value. So we must check them all
if (m_fields != null) {
int size = m_fields.size();
for (int i = 0; i < size; i++) {
FieldEditor editor = (FieldEditor) m_fields.get(i);
valid = valid && editor.isValid();
if (!valid) {
m_invalidFieldEditor = editor;
break;
}
}
}
setValid(valid);
}
COM: <s> recomputes the pages error state by calling code is valid code for </s>
|
funcom_train/25186870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Locale parseLocale(String value) throws ParseException {
Locale locale = new Locale(value);
boolean locValid = false;
for (Locale loc : Locale.getAvailableLocales()) {
if (loc.equals(locale)) {
locValid = true;
break;
}
}
if (!locValid) {
throw new ParseException("Unrecognized locale: " + value, 0);
}
return locale;
}
COM: <s> returns locale corresponding to provided name value </s>
|
funcom_train/18141149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getMM(String month) {
month = month.toLowerCase();
for (int i=1;i<=months.length;i++) {
if (months[i-1].equals(month))
return i<10 ? "0"+i : ""+i;
}
return null;
}
COM: <s> turn month name into mm lower case </s>
|
funcom_train/25694147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExpectedSw1(int expectedSw1) throws IllegalArgumentException{
expectedSw1&=0xFF;
if(((expectedSw1&0xF0)!=0x90) &&
((expectedSw1&0xF0)!=0x60))
throw new IllegalArgumentException();
this.expectedSw1 = (byte) expectedSw1;
expectedSw1Set=true;
}
COM: <s> set the value of expected sw1 </s>
|
funcom_train/49997346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearGroup(String group) {
try {
JCS cache = JCS.getInstance(this.cacheName);
for (Object key : cache.getGroupKeys(group)) {
cache.remove(key, group);
}
}
catch (CacheException e) {
String msg = failureMsg + this.cacheName + ":" + e.getMessage();
this.logger.warning(msg);
}
}
COM: <s> removes everything in the specified group </s>
|
funcom_train/39024070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIterator() {
System.out.println("iterator");
Collection c = generateData();
FilteredCollection instance = new FilteredCollection(c,null,new MetaHandler());
Iterator expResult = c.iterator();
Iterator result = instance.iterator();
assertNotSame(expResult, result);
}
COM: <s> test of iterator method of class filtered collection </s>
|
funcom_train/35832103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void negateNum() {
int index = returnFirstNumIndex();
if (index != -1 && display.charAt(index) != 0){//there is a num and its not 0
if (index == 0)//if its first
display.insert(index,'-');
else if (display.charAt(index-1) == '-')//if its already negate
display.deleteCharAt(index-1);
else//if its just a num
display.insert(index,'-');
}
}
COM: <s> negates the first actual number in the buffer </s>
|
funcom_train/22530513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createUserArray() {
LDConnection myEngine = LDAdminEngineFactory.getSessionEngine(request);
String[] allusers = myEngine.listUsers();
Arrays.sort(allusers);
users = new String[allusers.length - 1];
int j = 0;
for (int i = 0; i < allusers.length; i++) {
if (!allusers[i].equals("ccadmin")) {
users[j++] = allusers[i];
}
}
}
COM: <s> creates the user array </s>
|
funcom_train/39397482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshUpdates() {
clearUpdates();
PluginInfos infos = container.findPlugins();
updates.addAll(infos.getUpdatedPlugins());
updates.addAll(infos.getNewPlugins());
Collections.sort(updates,new Comparator<PluginInfo>() {
public int compare(PluginInfo info1, PluginInfo info2) {
return info1.getName().compareTo(info2.getName());
}
});
unreachableServers.addAll(infos.getUnreachableServers());
Collections.sort(unreachableServers);
}
COM: <s> refreshes the list of all updated and new plugins and the list of </s>
|
funcom_train/22665092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnCreateRoom() {
if (btnCreateRoom == null) {
btnCreateRoom = new JButton();
btnCreateRoom.setBounds(new Rectangle(92, 347, 121, 28));
btnCreateRoom.setText("Create Room");
btnCreateRoom.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
createRoom();
}
});
}
return btnCreateRoom;
}
COM: <s> this method initializes btn create room </s>
|
funcom_train/20828457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPopupMenu createEditorPopupMenu(){
JPopupMenu popup = new JPopupMenu();
addPopUpItem(popup, closeAction);
popup.addSeparator();
addPopUpItem(popup, saveAction);
addPopUpItem(popup, saveAsAction);
popup.addSeparator();
addPopUpItem(popup, cutAction);
addPopUpItem(popup, copyAction);
addPopUpItem(popup, pasteAction);
return popup;
}
COM: <s> creates the popup menu for the editor </s>
|
funcom_train/42670128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getOutrosObitos() {
if (OutrosObitos == null) {//GEN-END:|136-getter|0|136-preInit
// write pre-init user code here
OutrosObitos = new TextField("Outros \u00D3bitos", null, 3, TextField.NUMERIC);//GEN-LINE:|136-getter|1|136-postInit
OutrosObitos.setString("0");
}//GEN-BEGIN:|136-getter|2|
return OutrosObitos;
}
COM: <s> returns an initiliazed instance of outros obitos component </s>
|
funcom_train/42440363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closeResources() {
if (resultSet != null) {
try {
resultSet.close();
} catch (SQLException ex) {
} finally {
resultSet = null;
}
}
if (statement != null) {
try {
statement.close();
} catch (SQLException ex) {
} finally {
statement = null;
}
}
}
COM: <s> close the resources </s>
|
funcom_train/3847597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRandomWord(int numOfChars) {
StringBuffer result = new StringBuffer( numOfChars );
boolean vogal = false;
if( (numOfChars % 2) != 0 )
vogal = true;
for (int i = 0; i < numOfChars; i++){
if(vogal)
result.append(getRandomLowerVogal());
else
result.append(getRandomLowerConsoante());
vogal = !vogal;
}
return result.toString();
}
COM: <s> returns a random word with the given num of chars </s>
|
funcom_train/31192887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getcon( int F, int L ) {
Vector v = new Vector();
for(int i=0; i<getNstates(); i++) {
if( testcon( F, L, i ) ) {
Vector vv = new Vector(3);
vv.add(new Integer( i ));
vv.add(new Boolean( isInitState( i )));
vv.add(new Boolean( isFinalState( i )));
v.add( vv );
}
}
return v;
}
COM: <s> returns vector vector int bool bool containing a transition </s>
|
funcom_train/2579772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInteriorGap(double percent) {
if ((percent < 0.0) || (percent > MAX_INTERIOR_GAP)) {
throw new IllegalArgumentException(
"Invalid 'percent' (" + percent + ") argument.");
}
if (this.interiorGap != percent) {
this.interiorGap = percent;
fireChangeEvent();
}
}
COM: <s> sets the interior gap and sends a </s>
|
funcom_train/36636661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveTreeAs() {
//Pick a file
int choice = fileChooser.showSaveDialog(this);
if (choice != JFileChooser.APPROVE_OPTION) {
refresh();
return;
}
String filename = fileChooser.getSelectedFile().getAbsolutePath();
//Write the tree out
try {
synchronized (transformationTree) {
ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(filename)));
((SceneNode) transformationTree.getRoot()).save(out);
out.close();
}
}
catch (IOException ioe) {
showExceptionDialog(ioe);
}
refresh();
}
COM: <s> save a tree to a file </s>
|
funcom_train/36955472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setupRubyDocumentPartitioner(IDocument document, String partitioning) {
IDocumentPartitioner partitioner = createDocumentPartitioner();
if (document instanceof IDocumentExtension3) {
IDocumentExtension3 extension3 = (IDocumentExtension3) document;
extension3.setDocumentPartitioner(partitioning, partitioner);
} else {
document.setDocumentPartitioner(partitioner);
}
partitioner.connect(document);
}
COM: <s> sets up the ruby document partitioner for the given document for the </s>
|
funcom_train/46378331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLabelPosition(MouseEvent mouseEvent) {
Component component = mouseEvent.getComponent();
Point parentPoint = new Point(component.getLocationOnScreen());
parentPoint.translate(mouseEvent.getX() + 10, mouseEvent.getY() - 15);
labelFrame.setLocation(parentPoint);
}
COM: <s> sets the location of the frame holding the label given the current </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.