__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/3411716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int charWidth(int codePoint) {
if (!Character.isValidCodePoint(codePoint)) {
codePoint = 0xffff; // substitute missing glyph width
}
if (codePoint < 256) {
return getWidths()[codePoint];
} else {
char[] buffer = new char[2];
int len = Character.toChars(codePoint, buffer, 0);
return charsWidth(buffer, 0, len);
}
}
COM: <s> returns the advance width of the specified character in this </s>
|
funcom_train/12546971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setStringToPop(String stringToPop) {
/*
* if (!automata.StringChecker.isAlphanumeric(stringToPop)) throw new
* IllegalArgumentException("Pop string must "+ "be alphanumeric!");
*/
PushdownAutomaton myPDA = (PushdownAutomaton) this.getAutomaton();
if (myPDA.singleInputPDA && stringToPop.length() > 1){
throw new IllegalArgumentException("Pop string must have no more than one character!");
}
myStringToPop = stringToPop;
}
COM: <s> sets the string to pop from stack portion of the transition label for </s>
|
funcom_train/40479283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void bind(VboConfig vbo) {
int vertexIndex = vbo.getVertexIndex();
if (vertexIndex >= 0) {
gl.enableVertexAttribArray(vertexIndex);
gl.bindBuffer(BufferTarget.ARRAY_BUFFER, vbo.getVertexBuffer());
gl.vertexAttribPointer(vertexIndex, vbo.getDataSize(),
vbo.getDataType(), vbo.isNormalize(), 0, 0);
}
}
COM: <s> enables and binds the vbo </s>
|
funcom_train/28633970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStartTime(long startTime) {
this.startTime = startTime;
this.time = startTime;
// check if inited
if ((this.startTime != -1) && (this.endTime != -1)) {
// notify interested parties that inited
setChanged();
notifyObservers(INIT);
sendNavigationEventToListeners(NavigationEvent.INIT);
}
}
COM: <s> sets the start time of the data in questions </s>
|
funcom_train/20317071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getPlot() {
Pattern patternPlot = Pattern.compile("<h5>Plot:</h5>\\s*([^<]+)\\s*<a");
Matcher matcherPlot = patternPlot.matcher(html);
if (matcherPlot.find()) {
//String plot = matcherPlot.group(1);
return matcherPlot.group(1);
}
return "";
}
COM: <s> returns the movies plot outline if the open document is a movie page </s>
|
funcom_train/21407013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleListSelectCommand(Command c,Displayable d){
//save the user state for more friendliness
currentQuestionIndex = ((List)d).getSelectedIndex();
currentQuestion = rptQtnsData.getQuestion(currentQuestionIndex);
//Tell the controller that we wanna edit this question.
if(currentQuestion.getDef().isEnabled()){
--currentQuestionIndex; //TODO This is just a temporary fix for some wiered behaviour
controller.execute(this, CommandAction.EDIT, currentQuestion);
}
}
COM: <s> processes the list selection command event </s>
|
funcom_train/17699344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Shape getShape()
{
return new CubicCurve2D.Double(p[0].getX(), p[0].getY(), p[1].getX(), p[1].getY(),
p[2].getX(), p[2].getY(), p[3].getX(), p[3].getY());
}
COM: <s> gets the current cubic curve </s>
|
funcom_train/7722676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String removePwd(String in) {
if(in == null) {
return null;
}
String pwd = System.getProperty("user.dir");
if(pwd.length() == in.length()) {
return in;
}
int idx = in.indexOf(pwd);
if(idx == 0) {
in = in.substring(pwd.length()+1);
}
return in;
}
COM: <s> removes the present working directory of a filename </s>
|
funcom_train/1241401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void switchToBackingStore() throws IOException {
bs_handle = File.createTempFile("Axis", ".msg");
bs_handle.createNewFile();
bs_handle.deleteOnExit();
bs_stream = new FileOutputStream(bs_handle);
bs_stream.write(cache.toByteArray());
cache = null;
}
COM: <s> method switch to backing store </s>
|
funcom_train/47311256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color darker() {
// Do not inline getRGB() to this.value, because of SystemColor.
int value = getRGB();
return new Color((int) (((value & RED_MASK) >> 16) * BRIGHT_SCALE),
(int) (((value & GREEN_MASK) >> 8) * BRIGHT_SCALE), (int) ((value & BLUE_MASK) * BRIGHT_SCALE), 255);
}
COM: <s> returns a darker version of this color </s>
|
funcom_train/18472929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component createComponent(RequestContext context) throws JspException {
OlapModel olapModel = (OlapModel) context.getModelReference(query);
if (olapModel == null)
throw new JspException("query \"" + query + "\" not found");
return new Navigator(getId(), null, olapModel);
}
COM: <s> creates the navigator component </s>
|
funcom_train/23632075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeCenter() {
viewChanger = new CardLayout();
//initialize the 3 different JPanels which go in the center
center = new JPanel( viewChanger );
month = new JPanel();
mview.addComponentsToPane(month);
week = weekView.getPanel();
day = dayView.getPane();
day.setFocusable(true);
center.add(week, WEEK);
center.add(day, DAY);
center.add(month, MONTH);
}
COM: <s> initialize the three panels which will switch out in the center </s>
|
funcom_train/22562917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisible(final boolean visible) {
this.visible = visible;
if (visible) {
try {
// ratingController will be refreshed whenever visibility changes from false to true.
this.ratingPopupController = initController(dialogInput.getCompetenceLevel());
} catch (SystemException e) {
PortletUtils.handleError(LOG, e);
} catch (PortalException e) {
PortletUtils.handleError(LOG, e);
}
}
}
COM: <s> sets the visible of this dialog </s>
|
funcom_train/8250042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getUnAuthorizedExceptionMessage(Throwable throwable) {
if(throwable == null) {
return null;
}
if(throwable instanceof UnauthorizedException) {
return throwable.getMessage()!=null?throwable.getMessage():"Unexpected UnauthorizedException";
} else if(throwable.getCause() != null) {
return getUnAuthorizedExceptionMessage(throwable.getCause());
} else {
return null;
}
}
COM: <s> tests if an exception is caused by an un authorized exception </s>
|
funcom_train/34707846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getAmbulanceStatusCheckBox() {
if (ambulanceStatusCheckBox == null) {
ambulanceStatusCheckBox = new JComboBox();
ambulanceStatusCheckBox.setBounds(new Rectangle(150, 106, 122, 26));
ambulanceStatusCheckBox.addItem("Available");
ambulanceStatusCheckBox.addItem("Off Duty");
ambulanceStatusCheckBox.addItem("Broken Down");
ambulanceStatusCheckBox.addActionListener(getUIController());
}
return ambulanceStatusCheckBox;
}
COM: <s> this method initializes ambulance status check box </s>
|
funcom_train/258691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSwitcherControl(Shell shell) {
switcher = new ToolBar(shell, SWT.FLAT | SWT.NO_FOCUS | SWT.VERTICAL);
PAGE_WELCOME.createToolItem(switcher);
PAGE_SKELETON.createToolItem(switcher);
PAGE_APPLICATION.createToolItem(switcher);
PAGE_EXECUTABLE.createToolItem(switcher);
// PAGE_JVM_OPTIONS.createToolItem(switcher);
}
COM: <s> creates the page switcher toolbar manager and its control </s>
|
funcom_train/3274034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long lastModified() {
if (file != null) {
return file.lastModified();
} else if (url != null) {
try {
return url.openConnection().getLastModified(); // Hail Mary
} catch (IOException e) {
return Long.MAX_VALUE;
}
}
return 0; // can't happen
}
COM: <s> returns when the resource was last modified </s>
|
funcom_train/35316917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSubjectPublicKey(byte[] key) throws IOException {
if (key == null) {
subjectPublicKey = null;
subjectPublicKeyBytes = null;
} else {
subjectPublicKeyBytes = key.clone();
subjectPublicKey = X509Key.parse(new DerValue(subjectPublicKeyBytes));
}
}
COM: <s> sets the subject public key criterion </s>
|
funcom_train/34628019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openEditorDialog(int index) {
BuilderConfigDialog dialog = new BuilderConfigDialog(getShell(),
BuilderRegistry.getRunner(index));
int code = dialog.open();
if (code == BuilderConfigDialog.OK) {
builderList.setItem(index, getRunnerLabel(index));
}
}
COM: <s> opens the builder config dialog </s>
|
funcom_train/18000722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addResult(Long fixupId) {
// Should we collect this result?
if (getStatus() == FixupStatus.STATUS_COLLECT_RESULTS) {
// Yes! Have we reached the max results we want to store?
if (m_results.size() < MAX_RESULTS) {
// No! Store it.
m_results.add(fixupId);
return true;
}
}
return false;
}
COM: <s> add a result to our list </s>
|
funcom_train/39488107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMixedDeadlock () {
SyncRunnable r1 = new SyncMthRunnable();
SyncRunnable r2 = new SyncBlockRunnable();
r1.setOther(r2);
r2.setOther(r1);
//Thread t1 = new Thread(r1);
Thread t2 = new Thread(r2);
Thread t1 = new Thread(r1);
t1.start();
t2.start();
}
COM: <s> the test which mixes synchronized method attr with monitorenter exit </s>
|
funcom_train/17848984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Calendar createStartTime(Program prg) {
Calendar c = (Calendar) prg.getDate().getCalendar().clone();
c.set(Calendar.HOUR_OF_DAY, prg.getHours());
c.set(Calendar.MINUTE, prg.getMinutes());
c.set(Calendar.SECOND, 0);
return c;
}
COM: <s> creates a calendar instance containing the start time </s>
|
funcom_train/18321273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSubmachineIdent(Point location) {
int pos = LabelHelper.getPositionForPoint(subMachines, location);
if (pos == -1) {
return null;
}
String s = subMachines.getText();
return Helper.getSubstring(Helper.SUBACHINE_PATTERN, s.substring(SUBMACHINES_PREFIX.length()), pos - SUBMACHINES_PREFIX.length());
}
COM: <s> returns submachine ident for given location in formatted string </s>
|
funcom_train/34836375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTestCaseClassName(String fileName) throws BuildException{
String name = fileName.replace(File.separatorChar, '.');
int lenSuffix;
if(name.endsWith(".class")){
lenSuffix = 6;
}else if(name.endsWith(".java")){
lenSuffix = 5;
}else{
throw new BuildException("TestCase (" + fileName + ") must be .class or .java files");
}
String className = name.substring(0, name.length() - lenSuffix);
return (className);
}
COM: <s> extract the name of a class from the name of the file </s>
|
funcom_train/21952684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(boolean autoExpunge) throws MessagingException, OperationCancelledException {
if (folderInfo != null) {
folderInfo.setFlags(messages, new Flags(Flags.Flag.DELETED), true);
if (autoExpunge)
folderInfo.expunge();
} else {
for (int i = 0; i < messages.length; i++)
messages[i].remove(autoExpunge);
}
}
COM: <s> this actually marks the message as deleted and if autoexpunge is </s>
|
funcom_train/7243633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countHigherAckBlocks() {
DataRecord d;
int count = 0;
for (long i = windowStart+1; i < windowStart+windowSize+1; i++) {
d = window.get(i);
if ( d != null && d.acks > 0 ) {
count++;
}
}
return(count);
}
COM: <s> count the number of acks from higher number blocks </s>
|
funcom_train/39895318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean createRole(String name, List<Privilege> priveleges) {
List<Role> roles = getRoles();
for(Role rol: roles)
if(rol.getName().equals(name))
return false;
Role role = new Role();
role.setName(name);
role.setPrivileges(priveleges);
em.persist(role);
return true;
}
COM: <s> creates new role with set of privileges </s>
|
funcom_train/8089992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Instance generateExample() throws Exception {
Random random = getRandom();
Instances format = getDatasetFormat();
if (format == null)
throw new Exception("Dataset format not defined.");
if (getVoteFlag())
throw new Exception("Examples cannot be generated one by one.");
// generate values for all attributes
format = generateExamples(1, random, format);
return format.lastInstance();
}
COM: <s> generate an example of the dataset dataset </s>
|
funcom_train/29917952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getPropertyAsBoolean(String resource, boolean defaultValue){
String value = administratorSettings.getProperty(resource);
if(value == null){
return defaultValue;
}
value = value.trim();
if(value.equalsIgnoreCase("true")){
return true;
}
if(value.equalsIgnoreCase("false")){
return false;
}
LocalLog.getLogger().log(Level.SEVERE,"Error i adminsettings, resource with key " + resource + " must have a value of either 'true' or 'false'. Default value will be used.");
return defaultValue;
}
COM: <s> retrieves the settings connected to the given resource as a boolean </s>
|
funcom_train/18003463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*public Path expand() {
if (steps.get(0) instanceof Variable) {
Path path = ((Variable)steps.get(0)).getPath();
this.steps.remove(0);
this.steps.addAll(0, path.steps);
}
return this;
}*/
COM: <s> returns expanded path </s>
|
funcom_train/20443191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getScreenCommand1() {
if (screenCommand1 == null) {//GEN-END:|31-getter|0|31-preInit
// write pre-init user code here
screenCommand1 = new Command("Screen", Command.SCREEN, 0);//GEN-LINE:|31-getter|1|31-postInit
// write post-init user code here
}//GEN-BEGIN:|31-getter|2|
return screenCommand1;
}
COM: <s> returns an initiliazed instance of screen command1 component </s>
|
funcom_train/17978032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean translateTarget(int robotId, double[] input) {
if(input.length != 3)
throw new RuntimeException("Simulator works in 2D - x, y and orientation required.");
if(!idToDynamicObject.containsKey(robotId))
return false;
DynamicObject object = idToDynamicObject.get(robotId);
object.target[0] = input[0];
object.target[1] = input[1];
object.target[2] = input[2];
return true;
}
COM: <s> translates the target of the robot </s>
|
funcom_train/22498307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undoableEditHappened(final UndoableEditEvent e) {
// ignore all events happened when the html source code pane is open
if (getCurrentDocumentPane().getSelectedTab() != DocumentPane.VIEW_TAB_LAYOUT) {
return;
}
getUndo().addEdit(e.getEdit());
}
COM: <s> messaged when the document has created an edit the edit is </s>
|
funcom_train/3869496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(JRadioButtonMenuItem menuButton) {
// frameRadioButtonMenuItemGroup.remove(menuButton);
buttons.remove(menuButton);
super.remove(menuButton);
// cannot simply remove the radio menu button, as need to renumber the
// keyboard shortcut keys as well. Hence, a call to refreshMenu is in order...
refreshMenu(); // refresh the mnemonics associated with the other items
}
COM: <s> removes the specified radio menu button from the menu </s>
|
funcom_train/11378575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void runProgram(String memLimit) throws IOException {
boolean mayExit = false;
StreamJob job = new StreamJob(genArgs(memLimit), mayExit);
job.go();
String output = MapReduceTestUtil.readOutput(outputPath,
mr.createJobConf());
assertEquals("output is wrong", SET_MEMORY_LIMIT,
output.trim());
}
COM: <s> runs the streaming program </s>
|
funcom_train/34527188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document loadDocument() throws RequestException, DocumentException, EvaluationException, DataSourceException {
String name = packRequest.getName();
String type = Pack.TYPE;
String outputType = packRequest.getOutputType();
Map<String, Object> properties = packRequest.getProperties();
return loadDocument(name, type, outputType, properties);
}
COM: <s> loads and returns the document assigned to this context </s>
|
funcom_train/22345497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
// new object passing the reference to the server
TyMenu menu = new TyMenu(ti);
// make visable
menu.setVisible(true);
// lock on this monitor
synchronized (this) {
// till stopped
while (!stopme) {
// wait for a notifyAll
try {
wait();
} // end-try
catch (InterruptedException e) {}
} // end while
} // end-sync
// no longer visable
menu.setVisible(false);
} // end-method
COM: <s> thread run method </s>
|
funcom_train/10858286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testASCIIFolding() throws Exception {
Reader reader = new StringReader("Česká");
Tokenizer tokenizer = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
ASCIIFoldingFilterFactory factory = new ASCIIFoldingFilterFactory();
factory.init(DEFAULT_VERSION_PARAM);
TokenStream stream = factory.create(tokenizer);
assertTokenStreamContents(stream, new String[] { "Ceska" });
}
COM: <s> ensure the asciifolding filter factory works </s>
|
funcom_train/51630863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void perform(Shell parent, IRunnableContext context) throws InterruptedException, InvocationTargetException {
try {
ensureChecked();
if (fPreCheckStatus.hasFatalError()) {
showInformation(parent, fPreCheckStatus);
return;
}
} catch (CoreException e){
throw new InvocationTargetException(e);
}
RefactoringExecutionHelper helper= new RefactoringExecutionHelper(fRefactoring,
RefactoringCore.getConditionCheckingFailedSeverity(),
getJavaRenameProcessor().needsSavedEditors(),
parent,
context);
helper.perform(false, true);
}
COM: <s> executes the rename refactoring without showing a dialog to gather </s>
|
funcom_train/181998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintField(Graphics g) {
/* set the background to be white */
g.setColor(Color.WHITE);
g.fillRect(0, 0, getWidth(), getHeight());
/* get the current environment */
Environment env = ClientGUIEngine.getEnvironment();
/* don't paint anything if there's no environment */
if (env == null)
return;
/* draw everything */
drawEnvironmentCells(g);
drawViewAreaIndicator(g);
drawObjects(g);
drawStimuli(g);
drawBugs(g);
}
COM: <s> paint function for this map panel </s>
|
funcom_train/16380259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateNumberOfTasksType_Min(int numberOfTasksType, DiagnosticChain diagnostics, Map<Object, Object> context) {
boolean result = numberOfTasksType >= NUMBER_OF_TASKS_TYPE__MIN__VALUE;
if (!result && diagnostics != null)
reportMinViolation(CTEPackage.Literals.NUMBER_OF_TASKS_TYPE, new Integer(numberOfTasksType), new Integer(NUMBER_OF_TASKS_TYPE__MIN__VALUE), true, diagnostics, context);
return result;
}
COM: <s> validates the min constraint of em number of tasks type em </s>
|
funcom_train/25419033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SearchCriteria getSearchCriteria() throws SearchException {
if(this.searchCriteria != null){
return this.searchCriteria;
}
if(this.getRepository() == null) {
throw new SearchException(ISearchSaveRepository.class.getCanonicalName()
+ " missing from " + this.getClass().getCanonicalName());
}
// TODO: Retrieve
return null;
}
COM: <s> gets the search criteria </s>
|
funcom_train/34655787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getUserDN(String userIdNumber) throws Exception {
String userDNreturn = "";
SearchControls sc = new SearchControls();
sc.setSearchScope(SearchControls.SUBTREE_SCOPE);
NamingEnumeration persons = null;
try {
persons = this.getAnonymousBindFromIdAut().search("",
"uidNumber=" + userIdNumber, sc);
while (persons.hasMore()) {
SearchResult sr = (SearchResult) persons.next();
userDNreturn = sr.getName();
break;
}
} catch (NamingException e) {
}
return userDNreturn;
}
COM: <s> uses a anonymous bind and returns the ldap searchstring to find the </s>
|
funcom_train/50982889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddNullComponent() {
final TableLayout layout = new TableLayout();
try {
layout.addLayoutComponent(null, new TableLayoutConstraints(1,2));
}
catch( final DetailedNullPointerException e ) {
assertEquals("comp", e.getArgumentName());
}
}
COM: <s> make sure you cant pass in a null component </s>
|
funcom_train/13257972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getDialog(final JComponent panel, String title) {
createDialog();
// Adds input panel
dialogFrame.getContentPane().add(panel, BorderLayout.CENTER);
// Sets title
if (title != null) {
dialogFrame.setTitle(title);
}
// If this is a wizard panel call gotFocus() method
if (panel instanceof WizardPanel) {
((WizardPanel) panel).gotFocus();
}
// Shows dialog
dialogFrame.show();
}
COM: <s> returns modal dialog box showing given panel and with given title </s>
|
funcom_train/35111873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PlurkNotifier getUserChannel() throws PlurkException {
try {
HttpGet method = (HttpGet) PlurkActionSheet.getInstance()
.getUserChannel(config.args().getMap());
return new PlurkNotifier(executor.getHttpClient(), JsonUtils.toObject(executor.execute(method)));
} catch (Exception e) {
throw PlurkException.create(e);
}
}
COM: <s> get instant notifications when there are new plurks and responses on a </s>
|
funcom_train/46727609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerActions() {
getFormMediator().register(new IReceiveMessage() {
public boolean receive(ISEvent event, Object value) throws Exception {
switch (event) {
case EXECUTEACTION:
BaseAction action = (BaseAction) value;
switch (action.getActionReference()) {
case ADDTERM:
addTerm(action.getContextRefId());
return true;
case ADDTERMSUBCATEGORY:
addTermSubcategory(action.getContextRefId());
return true;
case EXECUTEDEFAULTACTION:
if (action.hasContext(ContextReference.FORMEDITORNEWCONTROLLIST)) {
selectControl();
}
return true;
}
}
return false;
}
},this);
}
COM: <s> form specific message mediation </s>
|
funcom_train/18256478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color getColor(Object object) {
float agentColor = (float) dataPoint.getBracketedValue(object);
float r = redMinimum + (agentColor * (redMaximum - redMinimum));
float g = greenMinimum + (agentColor * (greenMaximum - greenMinimum));
float b = blueMinimum + (agentColor * (blueMaximum - blueMinimum));
return new Color(r, g, b);
}
COM: <s> returns maximum color at intensity defined by the data point </s>
|
funcom_train/22238534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEchoColor(Color3f color) {
if (echoColor == null)
echoColor = new Color3f(color) ;
else
echoColor.set(color) ;
if (echoGeometry != null) {
Appearance a = echoGeometry.getAppearance() ;
Material m = a.getMaterial() ;
m.setDiffuseColor(echoColor) ;
}
}
COM: <s> sets the color of the 6 dof sensor echo </s>
|
funcom_train/48053934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processSelectionRequest(AbstractOPCTreeTableNode node) {
if (node instanceof ItemTreeTableNode) {
processSelectionRequest((ItemTreeTableNode) node);
} else if (node instanceof BranchTreeTableNode) {
processSelectionRequest((BranchTreeTableNode) node);
} else if (node instanceof CompositeTreeTableNode) {
processSelectionRequest((CompositeTreeTableNode) node);
}
}
COM: <s> evaluates which nodes should go through a selection process </s>
|
funcom_train/24186411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetProbabilitySpaces() {
// Parse all the probability spaces in the problem
List< ? extends UtilitySolutionSpace<AddableInteger, AddableReal> > probSpaces2 = parserReal.getProbabilitySpaces();
// Check that all probability spaces were properly read
assertEquals (probSpaces.size(), probSpaces2.size());
probSpaces.removeAll(probSpaces2);
assertTrue (probSpaces.isEmpty());
}
COM: <s> test method for get probability spaces </s>
|
funcom_train/43866098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point findFreePosition() {
Random generator = new Random();
while (true) {
int x = (int) Math.round(terrain_width * generator.nextDouble());
int y = (int) Math.round(terrain_height * generator.nextDouble());
if (isFreePosition(new Point(x,y))) {
return new Point(x,y);
}
}
}
COM: <s> finds randomly a free position for our node </s>
|
funcom_train/19416541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isJoinOK(Player joiner, boolean invited) {
if (joinlist.containsKey(joiner.getId())) {
JoinInfo jinfo = joinlist.get(joiner.getId());
// change 15000 to either a constant defined at top of
// file or a variable read from config
if (jinfo.time + 15000 > System.currentTimeMillis() &&
jinfo.invite == invited)
return true;
}
return false;
}
COM: <s> checks if player i joiner i is allowed to join the current player </s>
|
funcom_train/9978140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkAlreadyExist() {
List<NodeLink> links = context.getProject().getLinksFrom(node1);
for (NodeLink nl: links) {
if (nl.getLinkMgrId().equals(JspToUrlLinkManager.ExtId)) {
String name = nl.getSpecificAttributes().getProperty("name");
if (this.linkName.equals(name) && this.link != nl)
return true;
}
}
return false;
}
COM: <s> check if a link with the given name already exists </s>
|
funcom_train/50397021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToHold() throws PersistenceException, InterruptedException{
ModelBase ag=(ModelBase)action.getAjd();
String workflowID=ag.getWorkflowID();
WorkflowContainer wfc=PEConfig.getInstance().getPersistence().getForUpdate(workflowID);
SubflowContainer sfc=wfc.findSubFlowContainingActivity(ag.getID());
try{
sfc.hold();
}
finally{
PEConfig.getInstance().getPersistence().write(wfc);
}
}
COM: <s> set the innermost group containing this activty on hold </s>
|
funcom_train/29768530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReplaceIncludeStartEnd() {
String expected = "123" + replacement + "xyz";
String result = Strings.replace(stringForReplacement, replacementStartMarker, true, replacementEndMarker, true,
replacement);
assertTrue("Replaced string should be: '" + expected + "' but was '" + result + "'", expected.equals(result));
}
COM: <s> replace start and end marker too </s>
|
funcom_train/28669314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MutableString append(float f) {
// new FloatingDecimal(f).appendTo(this);
// return this;
/**
* The above code which works in java.lang.AbstractStringBuilder but does not
* call a method of the Appendable interface but append(char[], int, int) instead.
*/
return append(String.valueOf(f));
}
COM: <s> appends the string representation of the code float code </s>
|
funcom_train/50488303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void internalDayOfMonthLast(SrvGregorianCalendar cal) {
//cal.add(cal.MONTH, 1);
//cal.internalDayOfMonthFirst(cal);
cal.set(Calendar.DATE ,cal.getActualMaximum(Calendar.DATE));
//cal.complete();
//cal.add(cal.DATE, -1);
}
COM: <s> internal day last </s>
|
funcom_train/47205774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element toXML(OWLClass cl, OWLOntology ontology) {
Element el = new Element(CLASS);
el.addAttribute(new Attribute(URI, cl.getURI().toString()));
StringBuilder sb = new StringBuilder();
for (OWLAnnotation<OWLClass> annotation : cl.getAnnotations(ontology,
OWLRDFVocabulary.RDFS_LABEL.getURI())) {
sb.append(annotation.getAnnotationValueAsConstant().getLiteral());
}
el.addAttribute(new Attribute(LABEL, sb.toString()));
return el;
}
COM: <s> converts element to xml </s>
|
funcom_train/32354742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean requestID(Item item) throws Exception {
Identifier id = new BasicIdUriResolver().tryResolve(item.getItemId());
RequestID reqid = new RequestID();
reqid.setHost(id.getHost().toString());
reqid.addId(id.getId());
boolean error = false;
try {
stub.requestID(reqid);
} catch (Exception e) {
logger.error(e.getMessage());
throw e;
}
return error;
}
COM: <s> requests the creation of an item with the provided id </s>
|
funcom_train/44011536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCustMI() {
System.out.println("setCustMI");
String custMI = "";
CustomerBO instance = null;
instance.setCustMI(custMI);
// 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 mi method of class edu </s>
|
funcom_train/28273800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream createArtifactStream(IndexedArtifactDependency artifact) {
org.apache.maven.artifact.Artifact mavenArtifact = createMavenArtifact(artifact);
try {
artifactResolver.resolve(mavenArtifact, remoteRepositorys, localRepository);
} catch (ArtifactResolutionException e) {
LOG.warn(e);
} catch (ArtifactNotFoundException e) {
LOG.debug(artifact + " not found - this must not be a problem");
}
File artifactFile = mavenArtifact.getFile();
try {
return new FileInputStream(artifactFile);
} catch (FileNotFoundException e) {
LOG.warn(e);
}
return null;
}
COM: <s> returns a inputstream for the artifact or null if not found </s>
|
funcom_train/28472113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AuthorSubscriptions createAuthorSubscriptions(int pCount){
AuthorSubscriptions authorSubscriptions = new AuthorSubscriptions();
for (int i = 0; i < pCount; i++){
AuthorSubscription authorSubscription = new AuthorSubscription();
String name = Integer.toString(pCount + i);
authorSubscription.setAuthor(name);
authorSubscriptions.add(authorSubscription);
}
return authorSubscriptions;
}
COM: <s> creates a collection of author subscriptions </s>
|
funcom_train/6262635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object value) {
// IMPORTANT! Equality should be checked in this order!
// If value is instance of the Keyword, then this._value.eguals(value._value)
// is performed.
return
getUniqueString().equals(value) ||
value != null && value.equals(getValue());
}
COM: <s> returns true if the keyword equals specified value </s>
|
funcom_train/6204254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openSource(IFile sourceFile) {
if ((sourceFile != null) && (sourceFile.exists())) {
try {
FileEditorInput input = new FileEditorInput(sourceFile);
getWorkbenchSite().getWorkbenchWindow().getActivePage().openEditor(input, JavaUI.ID_CU_EDITOR);
} catch (PartInitException e) {
GaijinUIPlugin.showError(e.getStatus());
}
}
}
COM: <s> open the given file in an editor </s>
|
funcom_train/31558061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void index() {
// big steps
search(BIG_START, BIG_STOP, BIG_STEP);
// refine that best value
search(bestExp-BIG_STEP, bestExp+BIG_STEP, BIG_STEP/10); // mecki: .003
// for real, now
p = bestExp;
compute(true);
}
COM: <s> run the index do a search in two passes to find a good </s>
|
funcom_train/50916010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CMLTableHeader createTableHeader() {
CMLTableHeader tableHeader = new CMLTableHeader();
// CMLUtil.throwNYI();
List<HasArraySize> arraysAndLists = this.getArrays();
for (HasArraySize node : arraysAndLists) {
CMLTableHeaderCell tableHeaderCell = this.createTableHeaderCell(node);
tableHeader.addTableHeaderCell(tableHeaderCell);
}
return tableHeader;
}
COM: <s> create table header from chidren </s>
|
funcom_train/13597084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeRecentProject(String projectName, String projectFilePath){
for (int i = 0; i < previousProjects.size(); i++) {
String[] entry = (String[]) previousProjects.elementAt(i);
if (entry[0].equals(projectName) &&
entry[1].equals(projectFilePath)){
previousProjects.remove(i);
return true;
}
}
return false;
}
COM: <s> remove the specified project from the recent projects history stack </s>
|
funcom_train/781266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyOverrides() {
CollectionOverride co = (CollectionOverride)
CollectionOverride.getOverride(collectionId, pageContext.getRequest());
if (co != null) {
if (co.getOffset() != -1) {
offset = co.getOffset();
}
if (co.getSortBy() != null) {
sortBy = co.getSortBy();
}
}
}
COM: <s> apply overrides if there is any </s>
|
funcom_train/21775752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setEnabledFields(boolean value) {
runEngineButton.setSelection(value);
if (value)
runEngineButton.setToolTipText("Start Europa engine");
else
runEngineButton.setToolTipText("Stop Europa engine");
startHorizonText.setEnabled(value);
endHorizonText.setEnabled(value);
resetHorizonButton.setEnabled(value);
runForStepsText.setEnabled(value);
runForStepsButton.setEnabled(value);
allowViolButton.setEnabled(value);
if (!value) {
stepCountLabel.setText("No info.");
timeSpentLabel.setText("No info.");
}
}
COM: <s> set the toggle status of run button and enabled status of everything else </s>
|
funcom_train/28452332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PyObject count(PyObject value) {
// note: cpython does not raise type errors based on item type
int iCount = 0;
for (int i = 0; i < delegate.getSize(); i++) {
if (value.equals(Py.java2py(Array.get(data, i)))) iCount++;
}
return new PyInteger(iCount);
}
COM: <s> return the number of occurrences of x in the array </s>
|
funcom_train/46860510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMnuitmSelectAll() {
if (mnuitmSelectAll == null) {
mnuitmSelectAll = new JMenuItem();
mnuitmSelectAll.setText("Select All");
mnuitmSelectAll.setIcon(new ImageIcon(getClass().getResource("/resources/icons/clear.png")));
mnuitmSelectAll.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
SelectAll();
}
});
}
return mnuitmSelectAll;
}
COM: <s> this method initializes mnuitm select all </s>
|
funcom_train/3401074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class getClass(String className, Localizable errorMessage) {
try {
if (classLoader == null)
return Thread.currentThread().getContextClassLoader().loadClass(className);
else
return classLoader.loadClass(className);
} catch (ClassNotFoundException e) {
throw new RuntimeModelerException(errorMessage);
}
}
COM: <s> utility method to load classes </s>
|
funcom_train/23340211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getConnectorsCheckBox() {
if (connectorsCheckBox == null) {
connectorsCheckBox = new JCheckBox();
connectorsCheckBox.setText("Connectors");
connectorsCheckBox.setActionCommand("Connectors");
connectorsCheckBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
toggleAllConnectors();
}
});
}
return connectorsCheckBox;
}
COM: <s> this method initializes connectors check box </s>
|
funcom_train/50505378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeFinderButton_actionPerformed(ActionEvent e) {
int selectedIndex = finderList.getSelectedIndex();
FinderDescriptor finder = (FinderDescriptor) finderList.getSelectedValue();
if(finder != null) {
finderList.remove(selectedIndex);
beanInfo.removeFinder(finder.getSignature());
buildLists();
}
}
COM: <s> removes the selected finder descriptor from the list </s>
|
funcom_train/32100452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStateValue(String key, String def)
{ /* getStateValue */
if(sgStateHT==null)
return(def);
String value= (String)sgStateHT.get(key);
if(value==null || value.equals("null"))
value= def;
return(UtilCM.rmvRtnChars(value));
} /* getStateValue */
COM: <s> get state value get param and use default if not found </s>
|
funcom_train/4233821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomInRange(double x, double y) {
Plot p = this.chart.getPlot();
if (p instanceof Zoomable) {
Zoomable z = (Zoomable) p;
z.zoomRangeAxes(this.zoomInFactor, this.info.getPlotInfo(),
translateScreenToJava2D(new Point((int) x, (int) y)),
this.zoomAroundAnchor);
}
}
COM: <s> decreases the length of the range axis centered about the given </s>
|
funcom_train/49791639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertLabelNotPresent(String text) {
IElement element;
try {
element = getElementByXPath("//label[contains(text(),'" + text + "')]");
} catch (AssertionFailedError e) {
// expected
element = null;
}
assertNull("Label with text '" + text + "' should not be present: " + element, element);
}
COM: <s> assert that a label with the given text is not present </s>
|
funcom_train/19745811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Forum updateChildForum(Forum forum) {
Forum oldChildForum = null;
if ( !forum.getParent().equals(this) ) {
int index = forum.getParent().childForums.indexOf(forum);
if (index != -1)
oldChildForum = (Forum) forum.getParent().childForums.remove(index);
childForums.add(forum);
forum.setParent(this);
}
return oldChildForum;
}
COM: <s> updates changed child forum </s>
|
funcom_train/7508388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DefaultUser createTestUser(String password) throws AuthenticationException {
String username = ESAPI.randomizer().getRandomString(8, DefaultEncoder.CHAR_ALPHANUMERICS);
Exception e = new Exception();
System.out.println("Creating user " + username + " for " + e.getStackTrace()[1].getMethodName());
DefaultUser user = (DefaultUser) ESAPI.authenticator().createUser(username, password, password);
return user;
}
COM: <s> creates the test user </s>
|
funcom_train/45542179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reloadExtensions() {
IExtensionRegistry registry= Platform.getExtensionRegistry();
Map map= new HashMap();
IConfigurationElement[] elements= registry.getConfigurationElementsFor(JSCPlugin.getPluginId(), EXTENSION_POINT);
for (int i= 0; i < elements.length; i++) {
JSCFoldingStructureProviderDescriptor desc= new JSCFoldingStructureProviderDescriptor(elements[i]);
map.put(desc.getId(), desc);
}
synchronized(this) {
fDescriptors= Collections.unmodifiableMap(map);
}
}
COM: <s> reads all extensions </s>
|
funcom_train/31902054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseMoved(MouseEvent e) {
AthensPane editor = (AthensPane) e.getSource();
if (! editor.isEditable()) {
Point pt = new Point(e.getX(), e.getY());
int pos = editor.viewToModel(pt);
if (pos >= 0) {
activateLink(pos, editor, MOVE);
}
}
}
COM: <s> and heres our addition </s>
|
funcom_train/21502368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NamedElement_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", "_UI_NamedElement_type"),
TypeSystemPackage.Literals.NAMED_ELEMENT__NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the name feature </s>
|
funcom_train/2577114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ensureAtLeast(AxisSpace space) {
this.top = Math.max(this.top, space.top);
this.bottom = Math.max(this.bottom, space.bottom);
this.left = Math.max(this.left, space.left);
this.right = Math.max(this.right, space.right);
}
COM: <s> ensures that this object reserves at least as much space as another </s>
|
funcom_train/3682478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNode(Node node) throws IllegalArgumentException {
synchronized (registry) {
String name = node.getName();
if (registry.containsKey(name)) {
throw new IllegalArgumentException("Name '" + name +
"' is not unique");
}
node.setGraph(this);
registry.put(name, node);
}
}
COM: <s> register the specified node in our registry of the complete tree </s>
|
funcom_train/50864624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showError(String message, Exception e) {
if (e != null) {
logger.log(Level.SEVERE, message, e);
}
else {
logger.log(Level.SEVERE, message);
}
if (useGUI) {
JOptionPane.showMessageDialog(null, message, "Error", JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> show a modal error message dialog </s>
|
funcom_train/44026681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addButton(Button b) {
if (buttonPanel == null) {
initButtonPanel();
}
DOM.setStyleAttribute(b.getElement(), "padding", "3px");
DOM.setStyleAttribute(b.getElement(), "fontWeight", "bold");
DOM.setStyleAttribute(b.getElement(), "minWidth", "80px");
buttonPanel.add(b);
}
COM: <s> add styles to a button and adds it to the button panel </s>
|
funcom_train/18593070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Component comp) {
if (getLayout() == layout) {
Component[] children = super.getComponents();
for (int i=1;i < children.length;i++) {
if (children[i] == comp) {
super.remove(children[i-1]);
break;
}
}
}
super.remove(comp);
}
COM: <s> automatically remove the strut spacing and the component </s>
|
funcom_train/2311658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void finalizeUnique() throws IOException{
FileWriter write;
try {
write = new FileWriter(uniqueFile, false);
} catch(IOException e){
report.reportErrorLog("localhost", "IOException hit while opening the unique file for saving the new value.");
throw e;
}
write.write(unique +"\n"); //we need to convert unique to String
write.flush();
write.close();
}
COM: <s> this method saves the current unique to the unique file </s>
|
funcom_train/32753697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadCorrection( final JSpinner fractionSpinner ) {
try {
final Number fractionToLoad = (Number)fractionSpinner.getValue();
_orbitModel.getFlattener().applyCorrections( fractionToLoad.doubleValue() );
}
catch( Exception exception ) {
JOptionPane.showMessageDialog( CorrectionDialog.this, exception.getMessage(), "Error applying corrections", JOptionPane.ERROR_MESSAGE );
}
}
COM: <s> load the correction based on the fraction in the spinner </s>
|
funcom_train/3909458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* protected MD_Field createAttributeWidget(SchemaAttribute att) {
// Do we have a vocabulary?
VocabularyList vList = _schemaController.getVocabularyList(att);
// If we do, make a combo box
if(rvList != null) return new MD_ComboBox(att, metadata, vList);
// Else make a StringPanel
else return new MD_TextField(att, metadata);
}
COM: <s> create a widget bound to an elements attribute </s>
|
funcom_train/1482793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMergePolicy(MergePolicy mp) {
ensureOpen();
if (mp == null)
throw new NullPointerException("MergePolicy must be non-null");
if (mergePolicy != mp)
mergePolicy.close();
mergePolicy = mp;
pushMaxBufferedDocs();
if (infoStream != null)
message("setMergePolicy " + mp);
}
COM: <s> expert set the merge policy used by this writer </s>
|
funcom_train/50872998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddElement() {
OMError error = new OMError();
error.setSymbol( new OMSymbol( "cd", "name" ) );
error.addElement( new OMInteger( "1" ) );
assertTrue( error.getElementAt( 0 ).getType().equals( "OMI" ) );
}
COM: <s> test of add element method of class nl </s>
|
funcom_train/27836471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getSaveModelMenuItem() {
if (saveModelMenuItem1 == null) {
saveModelMenuItem1 = new JMenuItem();
saveModelMenuItem1.setText("Save model");
saveModelMenuItem1
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
notifyObservers(new ModelSaveCommand(astRoot));
}
});
}
return saveModelMenuItem1;
}
COM: <s> this method initializes save model menu item1 </s>
|
funcom_train/9874074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unselectChildren(ArrayList geneIndices) {
for(int i=0; i<geneIndices.size(); i++) {
GeneGraphNode currGene = (GeneGraphNode)geneNodes.get(((Integer)geneIndices.get(i)).intValue());
currGene.setSelected(false);
currGene.setChanged(true);
currGene.render();
}
}
COM: <s> results in changing the selected status of all contained genes within the specified </s>
|
funcom_train/986908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem8() {
if (stringItem8 == null) {//GEN-END:|118-getter|0|118-preInit
// write pre-init user code here
stringItem8 = new StringItem("Sitio de la compra:", "cajero 18");//GEN-LINE:|118-getter|1|118-postInit
// write post-init user code here
}//GEN-BEGIN:|118-getter|2|
return stringItem8;
}
COM: <s> returns an initiliazed instance of string item8 component </s>
|
funcom_train/445629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnConnectedGraphInWSMLDL() throws Exception {
errors.clear();
logExpr = leFactory.createLogicalExpression(
"?x[attr hasValue ?y] implies ?w[attr2 hasValue ?z].",
ontology);
boolean valid = validator.isValid(logExpr, WSML.WSML_DL, errors, warnings);
// printError(errors);
assertFalse(valid);
}
COM: <s> in the following logical expression x and y are not connected </s>
|
funcom_train/18507563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean fireFinalizeRow(DataSetEvent e) {
if (dataSetListeners != null) {
Vector listeners = dataSetListeners;
int count = listeners.size();
for (int i = 0; i < count; i++) {
boolean valid = ((DataSetListener)listeners.elementAt(i)).finalizeRow(e);
if (!valid)
return false;
}
}
return true;
}
COM: <s> fires the validate row event for all of the listeners </s>
|
funcom_train/50394530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveMetadata(String source, String target) throws IOException {
Document doc = getDocument(source);
if (doc == null) {
throw new IllegalArgumentException("No metadata indexed for " + source + ": unable to move");
}
removeMetadata(source);
createMetadata(target, extractMetadataFromDocument(doc), doc.get(CONTENT_KEY));
}
COM: <s> moves the metadata from </s>
|
funcom_train/42269412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startRicherCMS(final BeanUser usr) {
//on test pour voir si il faut lancer le wizard ou alord directement le main
rpcConfigurationService.SiteIsConfigured(new AsyncCallback<Boolean>() {
public void onFailure(Throwable error) {
PopUpMessage p = new PopUpMessage("Connection test confguration failed");
p.show();
}
public void onSuccess(Boolean result) {
eventBus.setUsr(usr);
if(result.booleanValue())
eventBus.startMain(usr);
else
eventBus.startWizard();
}
});
}
COM: <s> start wizard module or main module </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.