__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/7660975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHasWaitersIMSE() {
final Mutex sync = new Mutex();
final AbstractQueuedSynchronizer.ConditionObject c = (sync.newCondition());
try {
sync.hasWaiters(c);
shouldThrow();
} catch (IllegalMonitorStateException success) {
} catch (Exception ex) {
unexpectedException();
}
}
COM: <s> has waiters throws imse if not synced </s>
|
funcom_train/18728555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBounds() {
Rectangle result = testGroup.getBounds();
Rectangle expected = new Rectangle(28, 26, 721, 561);
//assertEquals("Bounding box not correct!", expected, result); // FIXME: was: x=27,y=26,width=722,height=561
}
COM: <s> test of get bounds method of class net </s>
|
funcom_train/35326696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setComponentOrientation(ComponentOrientation o) {
ComponentOrientation oldValue = componentOrientation;
componentOrientation = o;
// This is a bound property, so report the change to
// any registered listeners. (Cheap if there are none.)
firePropertyChange("componentOrientation", oldValue, o);
// This could change the preferred size of the Component.
invalidateIfValid();
}
COM: <s> sets the language sensitive orientation that is to be used to order </s>
|
funcom_train/207345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection list() throws GeneralException {
Vector files = new Vector();
String fileArray[] = null;
try {
fileArray = resource.list();
for (int i = 0; i < fileArray.length; i++) {
files.add(createGridFile(fileArray[i]));
}
} catch (Exception e) {
throw new GeneralException("Could not list directory contents");
}
return files;
}
COM: <s> list the contents of the current directory </s>
|
funcom_train/3077270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
synchronized (processes) {
Enumeration e = processes.elements();
while (e.hasMoreElements()) {
((Process) e.nextElement()).destroy();
}
try {
// wait for all processes to finish
processes.wait();
} catch (InterruptedException interrupt) {
// ignore
}
}
}
COM: <s> invoked by the vm when it is exiting </s>
|
funcom_train/14500116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test00SetupDatabase() throws Exception {
setProperties(getClass().getResourceAsStream("ts-setup1.properties"));
workerSession.reloadConfiguration(DISPATCHER0);
workerSession.reloadConfiguration(DISPATCHER9);
workerSession.reloadConfiguration(WORKER1);
workerSession.reloadConfiguration(WORKER2);
workerSession.reloadConfiguration(WORKER3);
}
COM: <s> setup signers and dispatchers definied in ts setup1 </s>
|
funcom_train/18485750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConnectedInTerminals(int id, int partID, int toPartPinID) {
for (int i = 0; i < connectedInTerms.size(); i++) {
if (((ConnectedInTerminal) connectedInTerms.elementAt(i)).id == id) {
return;
}
}
connectedInTerms.addElement(new ConnectedInTerminal(id, partID,
toPartPinID));
}
COM: <s> checks whether the connected in terms vector contains </s>
|
funcom_train/21320114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initEntities() {
// create the player ship and place it roughly in the center of the screen
ship = new ShipEntity(this,"sprites/ship.gif",370,550);
entities.add(ship);
// create a block of aliens (5 rows, by 12 aliens, spaced evenly)
alienCount = 0;
for (int row=0;row<5;row++) {
for (int x=0;x<12;x++) {
Entity alien = new AlienEntity(this,"sprites/alien.gif",100+(x*50),(50)+row*30);
entities.add(alien);
alienCount++;
}
}
}
COM: <s> initialise the starting state of the entities ship and aliens </s>
|
funcom_train/37740436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove (Process process) throws RemoteException {
ProcessDirectory procDir = wsc.getWorkflowService().processDirectory();
try {
procDir.removeProcess(process);
} catch (CannotRemoveException e) {
JSFUtil.addMessage (FacesMessage.SEVERITY_ERROR, L10N_MSGS,
"cannotRemove", null, e);
}
reloadBeforeRendering = true;
}
COM: <s> remove given process </s>
|
funcom_train/13390292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getOpString() throws TestException, MalformedURLException {
String testOpString = config.getStringConfigVal("testOpString", null);
if (testOpString == null) {
throw new TestException("testOpString not specified");
}
return new URL(testOpString);
}
COM: <s> retrieves the op string url specified by the code test op string code </s>
|
funcom_train/171277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitLocalVariableInstruction(LocalVariableInstruction o){
if (locals().maxLocals() <= (o.getType(cpg).getSize()==1? o.getIndex() : o.getIndex()+1) ){
constraintViolated(o, "The 'index' is not a valid index into the local variable array.");
}
}
COM: <s> assures the generic preconditions of a local variable instruction instance </s>
|
funcom_train/513687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResultSet sql(String sql) {
ResultSet rs = null;
Statement stmt = null;
try {
// Create a statement
stmt = conn.createStatement();
// Exectute the query and put ResultSet in rs
rs = stmt.executeQuery(sql);
} catch (SQLException e) {
System.out.println(e);
}
return rs;
}
COM: <s> executes sql on the dabase select statement etc </s>
|
funcom_train/9977724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIntToBinary() {
System.out.println("intToBinary");
Integer value = 154;
String expResult = "10011010";
String result = new String();
try {
result = NumeralSystem.intToBinary(value);
}
catch(Exception ex) {
System.out.println("Exception");
assertEquals(true, false);
}
assertEquals(expResult, result);
}
COM: <s> test of int to binary method of class numeral system </s>
|
funcom_train/26509344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNewFieldName(String fieldname) throws IllegalArgumentException {
if (fieldnames.contains(fieldname))
throw new IllegalArgumentException("Table already contains field name "+fieldname);
if (keyname.equals(fieldname))
throw new IllegalArgumentException("Table already contains field name "+fieldname+" as key");
fieldnames.add(fieldname);
}
COM: <s> creates a new column in this table </s>
|
funcom_train/26187157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fileMoved(VirtualFileMoveEvent event) {
PerforceFile oldFile = new PerforceFile(event.getOldParent(), (String) event.getFile().getName());
PerforceFile newFile = new PerforceFile(event.getNewParent(), (String) event.getFile().getName());
oldFile.integrate(newFile, false, false);
oldFile.revert();
oldFile.delete();
newFile.edit();
}
COM: <s> when a file is moved by intellij perfin will do an perfoce integrate </s>
|
funcom_train/35996317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean pushLocal(String name, KVariable var){
Map<String, KVariable> m = (Map<String, KVariable>) _tableQueue.getFirst();
if( containsLocalVariable(name)){
return false;
}
m.put(name,var);
return true;
}
COM: <s> conditionally pushes a name variable binding into the local scope </s>
|
funcom_train/27735444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String get(String key) {
try {
if (!payload.hasKey(key))
return "";
return StringUtils.toStringFromUTF8Bytes(payload.getBytes(key));
} catch (BadGGEPPropertyException ex) {
throw new RuntimeException("GGEP exception parsing value." + ex.getMessage());
}
}
COM: <s> parses out the given key or returns if the key is not present </s>
|
funcom_train/19324499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int traitTextDepth(final FObj fobj, final FoContext context) {
final PdTextDepth property = (PdTextDepth) getProperty(
FoProperty.TEXT_DEPTH);
if (property == null) {
return PdTextDepth.getValueNoInstance(fobj, context);
}
return property.getValue(context, fobj);
}
COM: <s> returns the text depth property </s>
|
funcom_train/46759266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long store(final long visitId, final FormModel form, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
if (visitId == 0L) {
throw new ParentModelNotPersistedException();
}
form.setVisitId(visitId);
Long formId = store(form, chain, call);
return formId;
}}; return (Long) call(method, call);
}
COM: <s> save the form model model creating a new form or updating existing rows </s>
|
funcom_train/25657158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public boolean keepURL(URL url) {
String path = url.getPath();
ArrayList da = this.getDisallowed();
if (da == null)
return true;
for (int i = 0; i < da.size(); i++) {
String disallow = (String) da.get(i);
if (path.startsWith(disallow)) {
return false;
}
}
return true;
}
COM: <s> if the url matches any of the diallowed paths return false </s>
|
funcom_train/44852968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkMandatory(DomainObject inModel, String inName, String inMsgKey) {
try {
Object lValue = inModel.get(inName);
if (lValue == null) {
addMessage(inMsgKey);
}
else if (lValue.toString().length() == 0) {
addMessage(inMsgKey);
}
}
catch (GettingException exc) {
addMessage(inMsgKey);
}
}
COM: <s> add the mandatory fields to check </s>
|
funcom_train/4835106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadNextLevel() {
if (levels != null) {
String nextLevel = levels.getNextLevel();
if(nextLevel == null) {
for (GameListener l : listeners) {
l.gameOver(new GameEvent(this));
}
} else {
loadLevel(nextLevel);
if (level == null) {
System.err.println("Required level file " + nextLevel + " does not exist.");
System.exit(1);
}
resetLevel();
player.nextLevel();
}
}
}
COM: <s> loads the next level if one exists </s>
|
funcom_train/7972068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_nine() throws Exception {
MyGlobalVars vars = new MyGlobalVars();
vars.setLayoutFile(PATH + "test9");
vars.setLayoutSchema(SCHEMA);
Layout layout = new LayoutParser().getLayout(vars, 0, "en");
assertEquals(4, layout.getPages().get(0).getChildren().size());
assertEquals(5, layout.getPages().get(1).getChildren().size());
}
COM: <s> this is a ballot that was generated by the tool </s>
|
funcom_train/32061375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkForGameEndConditions(TurnResult turnresult) {
if (this.finished)
return;
// check for victory
boolean victory = checkGameVictory(currentplayer);
if (victory) {
turnresult.setOutcome(Victory);
this.finished = true;
}
// check for defeat
boolean defeat = checkGameDefeat(currentplayer);
if (defeat) {
turnresult.setOutcome(Defeat);
this.finished = true;
}
}
COM: <s> check for conditions that end the game and pass the information onto the </s>
|
funcom_train/27835240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (obj instanceof ConnectionData
&& ((ConnectionData) obj).getID().equals(this.getID())) {
return true;
} else {
return false;
}
}
COM: <s> compares for equality </s>
|
funcom_train/49800154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetUserPrefs() throws Exception {
System.out.println("setUserPrefs");
userprefs = new UserPreferencesDTO();
userprefs.setDefaultFacility("ISIS");
userprefs.setResolution(DPResolution.res_1280x768);
userprefs.setResultsPerPage(50);
sd.setUserPrefs(sid, userprefs);
}
COM: <s> test of set user prefs method of class uk </s>
|
funcom_train/5380907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToolTipText(String toolTipText) {
String oldToolTipText = this.toolTipText;
if (!(oldToolTipText == null ? toolTipText == null : oldToolTipText
.equals(toolTipText))) {
this.toolTipText = toolTipText;
firePropertyChange(TOOL_TIP_TEXT, oldToolTipText, toolTipText);
}
}
COM: <s> sets the tool tip text for this action </s>
|
funcom_train/4024179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PImage image( int type ) {
// empty image
// -> display message & exit
if ( width==0 && height==0 ) {
System.err.println( "OpenCV could not define source dimensions.\n" );
return null;
}
// create image width pixels
PImage img = new PImage( width, height );
img.pixels = pixels(type);
// return image
return img;
}
COM: <s> return the specified open cv image </s>
|
funcom_train/8686891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws BuildException {
if (property == null) {
throw new BuildException("property attribute required", getLocation());
}
if (file == null) {
throw new BuildException("file attribute required", getLocation());
} else {
String value = file.getParent();
getProject().setNewProperty(property, value);
}
}
COM: <s> execute this task </s>
|
funcom_train/42667366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonCompare() {
if (jButtonCompare == null) {
jButtonCompare = new JButton();
jButtonCompare.setName("jButtonCompare");
jButtonCompare.setToolTipText("Compare the images");
jButtonCompare.setRolloverEnabled(false);
jButtonCompare.setText("Compare");
jButtonCompare.setAction(new Actioneer(this, jButtonCompare));
}
return jButtonCompare;
}
COM: <s> this method initializes j button compare </s>
|
funcom_train/20894029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getNodeById(Node node,String id){
Node result=null;
if (
node.getAttributes()!=null
&& node.getAttributes().getNamedItem("id")!=null
&& node.getAttributes().getNamedItem("id").getNodeValue()!=null
&& node.getAttributes().getNamedItem("id").getNodeValue().equals(id)
){
result=node;
}else{
NodeList enfants=node.getChildNodes();
for (int i=0;i<enfants.getLength() && result==null;i++){
result=getNodeById(enfants.item(i),id);
}
}
return result;
}
COM: <s> brute method to find an xml node </s>
|
funcom_train/3362765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processInputMethodEvent(InputMethodEvent e) {
AttributedCharacterIterator text = e.getText();
int commitCount = e.getCommittedCharacterCount();
// Keep track of the composed text
if (text != null) {
int begin = text.getBeginIndex();
int end = text.getEndIndex();
composedTextExists = ((end - begin) > commitCount);
} else {
composedTextExists = false;
}
super.processInputMethodEvent(e);
}
COM: <s> processes any input method events such as </s>
|
funcom_train/44011381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCreditCardExpYear() {
System.out.println("getCreditCardExpYear");
MembershipBO instance = null;
int expResult = 0;
int result = instance.getCreditCardExpYear();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get credit card exp year method of class edu </s>
|
funcom_train/9819057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkBitSpecifiers() {
if (numExpBits < 0 || numMantBits < 0 || numExpBits > 32
|| (numExpBits == 0 && numMantBits == 0)) {
throw new FloatingPointException("Invalid bit specifiers: " +
numExpBits + " exponent bits, " +
numMantBits +
" significand bits.");
}
}
COM: <s> ensures that the numbers of bits specified are valid </s>
|
funcom_train/32079703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDate (int year, int month, int day) {
checkWidget ();
if (!isValidDate(year, month, day)) return;
calendar.set(Calendar.YEAR, year);
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.MONTH, month);
if ((style & SWT.CALENDAR) != 0) {
updateControl();
setDay(day, false);
} else {
calendar.set(Calendar.DAY_OF_MONTH, day);
updateControl();
}
}
COM: <s> sets the receivers year month and day in a single operation </s>
|
funcom_train/35273184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetWeather() {
System.out.println("setWeather");
String wth = "It's Hot and Sunny";
InfoModel instance = new InfoModel();
instance.setWeather(wth);
String result = instance.getWeather();
assertEquals(wth, result);
// TODO review the generated test code and remove the default call to fail.
//fail("The test case is a prototype.");
}
COM: <s> test of set weather method of class info model </s>
|
funcom_train/3947346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransform(double m00, double m10, double m01, double m11, double m02, double m12) {
this.type = TYPE_UNKNOWN;
this.m00 = m00;
this.m10 = m10;
this.m01 = m01;
this.m11 = m11;
this.m02 = m02;
this.m12 = m12;
}
COM: <s> sets the transform in terms of a list of double values </s>
|
funcom_train/18347310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAssignableFrom(CapCommonClass capCommonClass) {
// special case for the pseudo superclass relationship to CapAny
CapCommonClass wrapper = getWrapper();
if (wrapper == CapAny.capCommonClass) {
return true;
}
// Are we the same or the superclass of our argument?
// need to ask the argument for its types list
return capCommonClass.getTypes().contains(wrapper);
}
COM: <s> determines if the class or interface represented by this </s>
|
funcom_train/16895689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getExpressionLanguage (Object comboElement) {
if (comboElement == NO_EXPRESSION || comboElement == SAME_AS_PARENT) {
return null;
}
String language = null;
if (comboElement instanceof ExpressionEditorDescriptor) {
language = ((ExpressionEditorDescriptor)comboElement).getExpressionLanguage();
} else if (comboElement instanceof String) {
language = (String)comboElement;
}
if (EMPTY_STRING.equals(language)) {
language = null;
}
return language;
}
COM: <s> returns the expression language string underlying the given combo element </s>
|
funcom_train/50033632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String ajax() {
try {
System.out.println("category : " + category);
if("".equals(category)){
display = false;
}
else{
ProjectListBean projectListBean = hibouWSPort.getProjectsByCategory(category);
if(projectListBean == null) {
return TECHNICAL_ERROR;
}
for(ProjectBean projectBean : projectListBean.getList()) {
projects.add(projectBean.getProjectName());
}
display = true;
}
return "ajax";
} catch(Exception e) {
return TECHNICAL_ERROR;
}
}
COM: <s> return a list of project by category </s>
|
funcom_train/11758086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean text_term_2(Term arg0, Term arg1){
if (!arg0.isGround()){
return unify(arg0,new Struct(arg1.toString()));
} else {
try {
String text = alice.util.Tools.removeApices(arg0.toString());
return unify(arg1,getEngine().toTerm(text));
} catch (Exception ex){
return false;
}
}
}
COM: <s> bidirectional text term conversion </s>
|
funcom_train/37840541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
JFileChooser fileChooser = new JFileChooser();
fileChooser.addChoosableFileFilter(new MarboardFileFilter());
int button = fileChooser.showOpenDialog(mainWindow.getMainFrame());
// Did the user select a file?
if (button == JFileChooser.APPROVE_OPTION) {
String filename = fileChooser.getSelectedFile().getAbsolutePath();
boardState.setFilename(filename);
Thread thread = new Thread(this, "importing");
thread.start();
}
}
COM: <s> shows the file open dialog and opens the selected file </s>
|
funcom_train/8774094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireDisconnected(final Stream stream) {
assert stream != null;
// to prevent ConcurrentModificationException
ApplicationListener[] myListeners = this.listeners.toArray(new ApplicationListener[0]);
for(ApplicationListener listener: myListeners) {
try {
listener.disconnected(stream);
} catch(Throwable e) {
Utils.handleUncaughtException(e, exceptionHandler);
}
}
}
COM: <s> fire an event if an ap2 ap connection is closed </s>
|
funcom_train/46884359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateHash(final long discs) {
long tmp = discs;
while (tmp != 0L) {
int sq = BitBoard.findFirstOne(tmp);
tmp &= BitBoard.CLEAR_MASK[sq];
hashKey ^= Hashing.HASH_KEYS[0][sq];
hashKey ^= Hashing.HASH_KEYS[1][sq];
}
}
COM: <s> update the hash key </s>
|
funcom_train/27826669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteModel(String uri) throws ModelException {
try {
File file=new File(new URI(uri));
if (file.exists())
if (!file.delete())
throw new ModelException("Cannot RDF model denoted by "+uri.toString());
return true;
}
catch (IllegalArgumentException e) {
return false;
}
catch (URISyntaxException e) {
return false;
}
}
COM: <s> deletes an existing model </s>
|
funcom_train/7255158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWriteEntity( RateControlledEntity entity, int partition_id ) {
if ( write_controllers.size() == 1 || partition_id < 0 ){
write_controllers.get(0).addWriteEntity(entity);
}else{
WriteController controller = write_controllers.get((partition_id%(write_controllers.size()-1))+1 );
controller.addWriteEntity( entity );
}
}
COM: <s> add an upload entity for write processing </s>
|
funcom_train/51685164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Principal getSinglePrincipal(Class className) {
Set principals = getSubject().getPrincipals(className);
if (principals.size() > 1) {
throw new IllegalStateException("Found more than one principal for class");
}
if (principals.size() == 0) {
throw new IllegalStateException("No principals for provided class");
}
return (Principal) principals.iterator().next();
}
COM: <s> extracts and returns the request principal from the subject </s>
|
funcom_train/23044609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOptionalPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AsyncActivity_optional_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AsyncActivity_optional_feature", "_UI_AsyncActivity_type"),
ConceptPackage.Literals.ASYNC_ACTIVITY__OPTIONAL,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the optional feature </s>
|
funcom_train/38556693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public C_Attribute createCAttributeFromDictionary(NSDictionary attr) {
C_Attribute newAttribute = new C_Attribute();
cat.debug("Creating attribute with data " + attr.toString());
newAttribute.setAttributeKey(attr.objectForKey("key").toString());
newAttribute.setAttributeValue(attr.objectForKey("value").toString());
return newAttribute;
}
COM: <s> convenience method for creating c attribute instances from given dictionaries </s>
|
funcom_train/25884730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void colorPick(){
switch(editPanel.getObjectColor()){
case WHITE: this.stroke(255, 255, 255, 200); break;
case BLUE: this.stroke(0, 0, 255, 200); break;
case GREEN: this.stroke(0, 255, 0, 200); break;
case YELLOW: this.stroke(255, 255, 0, 200); break;
case ORANGE: this.stroke(255, 125, 0, 200); break;
}
this.strokeWeight(5);
this.fill(0, 0, 0, 0);
}
COM: <s> pick color for sound object </s>
|
funcom_train/1379406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setSize(215, 324);
this.setBorder(BorderFactory.createTitledBorder(null, "Elenco", TitledBorder.DEFAULT_JUSTIFICATION,
TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
this.setViewportView(getPannello());
ascoltatori = new LinkedList<QtaChangeListener>();
}
COM: <s> this method initializes this </s>
|
funcom_train/24476527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean commit() throws LoginException {
try {
UserPrincipal user = new UserPrincipal(login);
PlainRolePrincipal role = new PlainRolePrincipal("AuthorizedUser");
subject.getPrincipals().add(user);
subject.getPrincipals().add(role);
return true;
} catch (Exception e) {
throw new LoginException(e.getMessage());
}
}
COM: <s> this is where should the entire authentication process succeeds </s>
|
funcom_train/25369320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getContent() {
String result;
if (m_Document == null)
return "";
try {
synchronized(m_Document) {
result = m_Document.getText(0, m_Document.getLength());
}
}
catch (Exception e) {
e.printStackTrace();
result = null;
}
return result;
}
COM: <s> returns the content </s>
|
funcom_train/20364974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initGenerator() {
generatorWindow = new GeneratorWindow("Composure - " + getTestName() );
generatorWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
generatorWindow.setSize(640, 480);
generatorWindow.setVisible(true);
Dimension d= generatorWindow.getSize();
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
int x = (screen.width/2)-(d.width/2);
int y = (screen.height/2)-(d.height/2);
generatorWindow.setLocation(x,y);
finder = new BasicFinder();
generatorWindow.toFront();
}
COM: <s> initialise the generator window center screen </s>
|
funcom_train/4484984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGet() {
SwagItem originalItem = Fixture.createSwagItem();
itemDao.insert(originalItem);
SwagItem retrievedItem = itemDao.get(originalItem.getKey());
assertEquals(originalItem,retrievedItem);
//Image is lazy loaded but make sure it's available when we access it
SwagImage image = retrievedItem.getImage();
assertNotNull(image);
}
COM: <s> make sure all fields are saved and that owned one to many relationship </s>
|
funcom_train/31155215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
Class c1 = this.getClass();
Class c2 = object.getClass();
if (!c1.equals(c2)) {
return false;
}
AbstractModifier am = (AbstractModifier) object;
if (this.getParameter() == am.getParameter()) {
return true;
}
return false;
}
COM: <s> tests if a given object is equal to this modifier </s>
|
funcom_train/30043156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLoop() {
if (clip == 0) {
if (ammo > 0) {
if (reload < reloadLoops) {
reload += 1;
}
else if (reload >= reloadLoops && charge >= chargeNeeded) {
reload = 0;
charge = 0;
if (ammo > clipSize) {
clip = clipSize;
} else {
clip = ammo;
}
ammo -= clip;
}
} // otherwise no ammo!
} else if (interval < intervalLoops) {
interval += 1;
}
}
COM: <s> adds time to reloading or pause </s>
|
funcom_train/49128291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTrip(PhotoEvent trip) {
// check that previous trip has been set and unregister if necessary
if (this.trip != null) {
this.trip.unassignImage(this);
}
// set trip
this.trip = trip;
// if new trip is not null, register this image in it
if (trip != null) {
trip.assignImage(this);
}
}
COM: <s> sets the trip event to the specified one assigns this image to it </s>
|
funcom_train/22523354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCmbLanguage() {
GridData gridData6 = new GridData();
gridData6.horizontalAlignment = GridData.FILL; // Generated
gridData6.horizontalSpan = 2; // Generated
gridData6.verticalAlignment = GridData.CENTER; // Generated
cmbLanguage = new Combo(this, SWT.BORDER);
cmbLanguage.setText("< select language >"); // Generated
cmbLanguage.setLayoutData(gridData6); // Generated
}
COM: <s> this method initializes cmb language </s>
|
funcom_train/39221263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IntervalNode successor(IntervalNode x) {
if (x.getRight() != IntervalNode.nullIntervalNode) {
return(x.getRight().treeMin());
}
IntervalNode y = x.getP();
while ((y != IntervalNode.nullIntervalNode) && (x == y.getRight())) {
x = y;
y = y.getP();
}
return y;
}
COM: <s> return the successor for a node i </s>
|
funcom_train/28224580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int chooseDarknessLevel() {
int hour = time.get(Calendar.HOUR_OF_DAY);
int minute;
if ((hour > SUNRISE) && (hour < SUNSET)) {
return 0; // Day
} else if ((hour < SUNRISE) || (hour > SUNSET)) {
return ONE_HUNDRED; // Night
} else {
minute = time.get(Calendar.MINUTE);
int darkness = (int) (DARKNESS_STEP * (minute / MINUTES_PER_HOUR));
if (hour == SUNRISE) {
return ONE_HUNDRED - darkness;
} else {
return darkness;
}
}
}
COM: <s> choose how dark the background should be depending on the time of the </s>
|
funcom_train/25793026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long storeData(String url, String username, String passwd, String token) {
ContentValues initialValues = new ContentValues();
initialValues.put(KEY_URL, url);
initialValues.put(KEY_USERNAME, username);
initialValues.put(KEY_PASSWD, passwd);
initialValues.put(KEY_TOKEN, token);
//TODO: change this to be dynamic, its always 0 for now
initialValues.put(KEY_ROWID, 0);
return mDb.insert(DATABASE_TABLE, null, initialValues);
}
COM: <s> create a new note using the title and body provided </s>
|
funcom_train/3596237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertParent(NOMElement newparent, NOMElement oldparent) throws NOMException {
if (!parents.contains(oldparent)) {
throw new NOMException("insertParent: element '" + oldparent.getID() + "' is not a parent of this element (" + id + "): cannot be removed");
}
List klist = new ArrayList(oldparent.getChildren());
oldparent.addChildAboveChildren(newparent, klist);
}
COM: <s> insert an new parent node making me and my siblings children </s>
|
funcom_train/43348753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(String fieldName) {
//return columnName.replace(' ', '_').toLowerCase();
int length = fieldName.length();
StringBuffer convertedName = new StringBuffer(length);
for (int i = 0; i < length; i++) {
char ch = fieldName.charAt(i);
if(ch == ' ') {
i++;
ch = fieldName.charAt(i);
Character.toUpperCase(ch);
}
convertedName.append(ch);
}
return convertedName.toString();
}
COM: <s> skips any space and make each next word start with upper case character </s>
|
funcom_train/29391066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean testStrings( String string1, String string2 ) {
// if this IniItem is case sensitive, then compare the two string with
// case sensitivity
if( caseSensitive ) {
return string1.equals(string2);
}
else {
// IniItem is case insensitive, therefore, compare strings whilst
// ignoring case sensitivity.
return string1.equalsIgnoreCase(string2);
}
}
COM: <s> p predicate that tests whether the two given strings are equal </s>
|
funcom_train/3715539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findHostNameByIp() {
StringBuffer tempHostName = new StringBuffer();
try {
InetAddress inetAddress = InetAddress.getByName(ipAddress);
tempHostName.append(inetAddress.getCanonicalHostName());
} catch (Exception e) {
errorhandler.error("Could not find Host");
}
hostName = tempHostName.toString();
}
COM: <s> finds hostname in host by given ip address </s>
|
funcom_train/51449142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show() {
// Do this later because a modal dialog will block
SwingUtilities.invokeLater(new Runnable() {
public void run() {
// Update the Panels
_generalPrefsPanel.setFields(_userPrefs);
_cpPrefsPanel.setFields(_userPrefs);
_mdPrefsPanel.setFields(_userPrefs);
_appearancePrefsPanel.setFields(_userPrefs);
_collagePrefsPanel.setFields(_userPrefs);
}
});
super.show();
}
COM: <s> over ride this so we can set up the panels </s>
|
funcom_train/43501768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NetTicket getTicket() {
NetTicket ticket = new NetTicket(ran.nextLong());
long now = System.currentTimeMillis();
long expiry = now + timeout;
MetaTicket metaTicket = new MetaTicket(ticket, expiry);
tickets.add(metaTicket);
logger.info("generating new ticket " + ticket.getNumber() + " expires " + TimeFormatter.format(expiry));
return ticket;
}
COM: <s> gets a new ticket </s>
|
funcom_train/33480327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdPause() {
if (cmdPause == null) {//GEN-END:|73-getter|0|73-preInit
// write pre-init user code here
cmdPause = new Command("Pause", Command.ITEM, 23);//GEN-LINE:|73-getter|1|73-postInit
// write post-init user code here
}//GEN-BEGIN:|73-getter|2|
return cmdPause;
}
COM: <s> returns an initiliazed instance of cmd pause component </s>
|
funcom_train/13994249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSelectedAction01() throws Exception {
actions[0].actionPerformed(null); // should be the same as setSelected
actions[1].actionPerformed(null);
assertEquals(actions[1], group.getSelectedAction());
assertEquals(false, actions[0].isSelected());
assertEquals(true, actions[1].isSelected());
assertEquals(false, actions[2].isSelected());
}
COM: <s> tests that the selection states changes to the correct action when it is </s>
|
funcom_train/18548449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refuse(RequirementTO rto, UserTO uto, String comment) throws DataAccessException {
Connection c = null;
try {
c = getConnection(false);
RequirementTriggerTO rtgto = new RequirementTriggerTO(comment, RequirementStatusTO.STATE_MACHINE_REFUSE);
this.changeStatus(rto, uto, rtgto, c);
c.commit();
} catch(Exception e){
try {
c.rollback();
} catch (SQLException er) {
LogUtil.log(this, LogUtil.LOG_ERROR, "", er);
}
throw new DataAccessException(e);
} finally{
this.closeConnection(c);
}
}
COM: <s> refuse a requirement </s>
|
funcom_train/2881034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws java.lang.IllegalArgumentException {
try {
if (mbeanServer.isInstanceOf(remoteName, "javax.management.NotificationBroadcaster")) {
mbeanServer.addNotificationListener(remoteName, listener, filter, handback);
}
} catch (RuntimeConnectionException ce) {} catch (InstanceNotFoundException infe) {}
}
COM: <s> adds a listener to a registered mbean </s>
|
funcom_train/46661910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int lame_get_totalframes() {
/* estimate based on user set num_samples: */
int totalframes = (int) (2 + ((double) lame.getFlags().num_samples * lame.getFlags().getOutSampleRate())
/ ((double) lame.getFlags().getInSampleRate() * lame.getFlags().getFrameSize()));
return totalframes;
}
COM: <s> lames estimate of the total number of frames to be encoded </s>
|
funcom_train/15493578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class getClass(String className) throws RMIException {
try {
return classLoader.loadClass(className);
} catch (Exception ex) {
log.error("Failed to retrieve the class: " + ex.getMessage(),ex);
throw new RMIException("Failed to retrieve the class : " +
ex.getMessage(),ex);
}
}
COM: <s> this method returns a reference to the class using the class name </s>
|
funcom_train/2583048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSubIntervalCount(Comparable rowKey, Comparable columnKey) {
int r = getRowIndex(rowKey);
int c = getColumnIndex(columnKey);
if (c != -1) {
return this.underlying.getSubIntervalCount(r,
c + this.firstCategoryIndex);
}
else {
throw new UnknownKeyException("Unknown columnKey: " + columnKey);
}
}
COM: <s> returns the number of sub intervals for a given item </s>
|
funcom_train/7281297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBothTagsExistReadv2() throws Exception {
File file = TestUtils.getResourceFile(dir+"ID3All.mp3");
assertTrue("file should exist", file.exists());
MetaReader data = metaDataFactory.parse(file);
validateTag((AudioMetaData) data.getMetaData());
}
COM: <s> tests that only v2 tag is read if both v1 tag exists </s>
|
funcom_train/47927913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetCharacters() {
dudeO.resetLimits();
dudeP.resetLimits();
loginScreen.getLoginScreen().getMenu().getMain().getCharSelect().proceed1 = false;
loginScreen.getLoginScreen().getMenu().getMain().getCharSelect().proceed2 = false;
}
COM: <s> added 19 jan 2011 by subiya cryolite </s>
|
funcom_train/43384764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeFallBack(Table table, String fileName, String fileEnd) {
File file = new File(fileName + LoadSave.TMP);
if (file.exists()) {
File bFile = new File(fileName + LoadSave.BAK);
if (bFile.exists()) {
bFile.delete();
}
file.renameTo(new File(fileName + LoadSave.BAK));
}
save(table, fileName + LoadSave.TMP, fileEnd);
}
COM: <s> backups the model </s>
|
funcom_train/25710165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int runOmegaCI() {
String[] command = {
binaryDirectory + "omegaCI" + binaryExtension,
workingDirectory + "omegaIn.dat",
workingDirectory + "omegaOut.dat",
Boolean.toString(masterVariables.getDebug())
};
return runApplication("Omega CI", command, true);
}
COM: <s> runs the omega confidence interval application </s>
|
funcom_train/40409633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URL getEntryUrl(String feedName, String entryId) throws MalformedURLException {
if (feedName == null || entryId == null) {
throw new MalformedURLException("feed/entry is not specified");
}
return new URL(gsaUrlStr + "/" + feedName + "/" + CharEscapers.uriEscaper().escape(entryId));
}
COM: <s> creates a url object based on the feed name and the entry id </s>
|
funcom_train/16786388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PreparedStatement getUpdateStatement() throws RQLException {
if (updateStmt == null) {
String sql = null;
try {
sql = "UPDATE " + tableName + " set contentAreas = ? WHERE pageGuid = ?";
updateStmt = connection.prepareStatement(sql);
} catch (SQLException ex) {
throw new RQLException("Error in prepare update sql statement" + sql, ex);
}
}
return updateStmt;
}
COM: <s> returns the prepared update statement </s>
|
funcom_train/36547509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FileRepresentation doDownloadDocument( VDocumentVersion001 vDocumentVersion001 ) throws SQLException {
String path = documentBasePathProject + vDocumentVersion001.getProjectId() + directorySeparator + vDocumentVersion001.getFilename() + "_" + vDocumentVersion001.getVersion() + "."
+ vDocumentVersion001.getFileExtension();
System.out.println( "&&&&&&&&&&&& PATH: " + path );
return getFileRepresentation( path );
}
COM: <s> do download document </s>
|
funcom_train/35073831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateCustomerPaymentProfile() {
BasicXmlDocument document = new BasicXmlDocument();
document.parseString("<" + TransactionType.UPDATE_CUSTOMER_PAYMENT_PROFILE.getValue()
+ " xmlns = \"" + XML_NAMESPACE + "\" />");
addAuthentication(document);
addRefId(document);
addCustomerProfileId(document);
addPaymentProfiles(document, null);
addValidationMode(document);
currentRequest = document;
}
COM: <s> update the customer payment profile </s>
|
funcom_train/50896886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JDCActivityInfo getActivityInfo() throws SQLException {
JDCActivityInfo oInfo;
try {
oInfo = new JDCActivityInfo(this);
} catch (Exception xcpt) {
throw new SQLException ("JDCActivityInfo.getActivityInfo() "+xcpt.getClass().getName()+" "+xcpt.getMessage());
}
return oInfo;
} // getActivityInfo()
COM: <s> get information of current activity at database to which this pool is connected </s>
|
funcom_train/49248189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initDataSource() throws SQLException {
if (getDataSource()==null) {
try {
Context jndiContext = (jndiProperties == null) ? new InitialContext() : new InitialContext(jndiProperties);
setDataSource((DataSource) jndiContext.lookup(jndiName));
} catch (NamingException namingException) {
throw new SQLException("Data source not found in JNDI registry",namingException);
}
}
}
COM: <s> look up data source in jndi registry </s>
|
funcom_train/45108672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int stop() throws Exception {
JDialogOperator gracefulDialog = jemmyOperation.pushButtonAndWaitForDialog(mainFrame, jmap.getStopButton(), jmap
.getGracefulDialog());
jemmyOperation.pushButton(gracefulDialog, jmap.getStopImmediatelyButton());
jemmyOperation.WaitForDialogToClose(jmap.getGracefulDialog());
return 0;
}
COM: <s> push the stop operation and stop immediately </s>
|
funcom_train/46265092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetImportance() throws AssertionFailedException {
System.out.println("setImportance");
Event instance = new Event(id, time, true);
assertEquals(true, e3.isImportant());
instance.setImportance(false);
assertEquals(false, instance.isImportant());
}
COM: <s> test of test set importance method of class event </s>
|
funcom_train/43245693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSponsorType() {
System.out.println("setSponsorType");
String sponsorType = "";
SponsorDemographicDG1Object instance = new SponsorDemographicDG1Object();
instance.setSponsorType(sponsorType);
// 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 sponsor type method of class org </s>
|
funcom_train/27787475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Symbol getFirstSymbol() {
int dateOffset = getFirstOffset();
// Loop through each day looking for any symbols
while(dateOffset <= getLastOffset()) {
List symbols = getSymbols(dateOffset++);
if(symbols.size() > 0)
return (Symbol)symbols.get(0);
}
// If we got here there are no symbols in the bundle.
assert false;
return null;
}
COM: <s> return the first symbol in the quote bundle </s>
|
funcom_train/46279797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String convertDoubleToUnsignedLong(Double lValue) {
if (lValue != null) {
NumberFormat nf = NumberFormat.getInstance();
nf.setGroupingUsed(false);
StringBuffer buf = new StringBuffer();
FieldPosition pos = new FieldPosition(NumberFormat.INTEGER_FIELD);
nf.format(lValue.doubleValue(), buf, pos);
return buf.toString();
}
return null;
}
COM: <s> format the double in to a string </s>
|
funcom_train/39123931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showContextMenu(final ProjectFrame frame, Component invoker, int x, int y) {
// build popup-menu from menuPrefix and own items
JPopupMenu popup = new JPopupMenu();
for (MenuPlugin plugin : menuPlugins) {
plugin.initContextMenu(popup, this);
}
initContextMenu(frame, popup);
popup.show(invoker, x, y);
}
COM: <s> shows the right click context menu of the current component </s>
|
funcom_train/23929093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() throws CloudException {
if( logger.isDebugEnabled() )
logger.debug( "Initialising AWS particle cluster with ID " + id );
aws.startInstance();
aws.send( Config.getMainConfig() );
aws.send( size );
clusterCom.updateLocalBest( this, knownBest );
logger.info( "Started and initialised AWS worker." );
}
COM: <s> this method sends all initialisation data to the worker </s>
|
funcom_train/32061451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getSingleFloatValueForGood(Good g) {
float value = 0;
float basicval = design.getSingleFloatValueForGood(g);
if (damage > CRITICAL_DAMEGE_LEVEL) {
return 0;
}
if (basicval > 0) {
value = (float)(basicval * (1 - damage) * (1 - damage));
}
return value;
}
COM: <s> returns the float value of how much of the good the component </s>
|
funcom_train/37400697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Style getStyle(String name) {
Style s = defaultStyle;
if (name != null && !name.equals("")) {
s = (Style) styles.get(name);
if (s == null) {
context.log("Access to unknown style `"+name+"', using default style instead.");
s = defaultStyle;
}
}
return s;
}
COM: <s> returns the desired style </s>
|
funcom_train/15491723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageProcessor rotateRight() {
int width2 = height;
int height2 = width;
ImageProcessor ip2 = createProcessor(width2, height2);
int[] arow = new int[width];
for (int row=0; row<height; row++) {
getRow(0, row, arow, width);
ip2.putColumn(width2-row-1, 0, arow, height2);
}
return ip2;
}
COM: <s> rotates the entire image 90 degrees clockwise </s>
|
funcom_train/2886819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JobConf createConfiguration() {
JobConf conf = new JobConf(getConf(), this.getClass());
conf.setJobName(getName());
conf.setJar(getJarName());
conf.setNumMapTasks(NUM_MAP_TASKS);
conf.setInt("dfs.replication", NUM_REPLICAS);
return conf;
}
COM: <s> create a configuration bound to this class with various options set up </s>
|
funcom_train/49943042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStringValue(final String value) {
if (textField != null) {
String newValue = value;
if (newValue == null) {
newValue = ""; //$NON-NLS-1$
}
oldValue = textField.getText();
if (!oldValue.equals(newValue)) {
textField.setText(newValue);
valueChanged();
}
}
}
COM: <s> sets this field editors value </s>
|
funcom_train/3724032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Annotation createAnnotation(String typeAsString, ATLASElement parent, ATLASElementSet regionDefiningAnnotations, ATLASElementSet contentDefiningAnnotations) {
return createAnnotation(resolveTypeFor(ATLASClass.ANNOTATION, typeAsString, parent.getDefiningCorpus()), parent, regionDefiningAnnotations, contentDefiningAnnotations);
}
COM: <s> creates an annotation from the sets of its content defining and </s>
|
funcom_train/26525375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void waitForSelection( int sleepTime, JWindow win ) {
int oldSelection;
boolean stable = false;
while( shouldLive || !stable ) {
win.toFront();
oldSelection = selection;
try{
Thread.currentThread().sleep( sleepTime );
} catch( InterruptedException ex) { ; }
stable = false;
if( ( selection == oldSelection ) &&
( selection != NO_SELECTION ) ) stable = true;
}
}
COM: <s> waits for user interaction if an option has been selection and </s>
|
funcom_train/1071380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Label getNameLabel() {
IFigure fig = getFigure();
if (fig instanceof IconFigure) {
return (Label) fig;
} else if (fig instanceof BasicNodeCubeISFigure) {
return ((BasicNodeCubeISFigure)fig).getNameLabel();
} else {
Debug.error(this, "NodeEditPart::getNameLabel() : Unknown Figure type.", channel);
return null;
}
}
COM: <s> returns the name label of this as a package edit part </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.