__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/43605863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CFGBuilder enterFinally(Term from) {
CFGBuilder v = (CFGBuilder) this.copy();
v.path_to_finally = new ArrayList(path_to_finally.size()+1);
v.path_to_finally.addAll(path_to_finally);
v.path_to_finally.add(from);
return v;
}
COM: <s> enter a finally block </s>
|
funcom_train/625498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vector names(AParamList parameters) {
Vector names = new Vector();
PFormalParameter headParam = parameters.getFormalParameter();
Iterator paramTail = parameters.getNextParam().iterator();
while (headParam != null) {
names.add(((AFormalParameter) headParam).getName());
if (paramTail.hasNext()) {
ANextParam nextParam = (ANextParam) paramTail.next();
headParam = nextParam.getFormalParameter();
} else {
headParam = null;
}
}
return names;
}
COM: <s> returns the sequence of names used in a parameter list </s>
|
funcom_train/45775131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void firstControlKeyPressed(KeyEvent event) {
// if tab with shift was pressed...
if ( ( event.KeyCode == Key.TAB ) && ( event.Modifiers== KeyModifier.SHIFT ) )
if ( nscrollvalue > 0 ) {
setScrollValue(nscrollvalue - 1);
focus(lastTime);
}
}
COM: <s> if the user presses shift tab on the first control and </s>
|
funcom_train/42012578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getFrameReservas() {
if (frameReservas == null) {
frameReservas = new JFrame();
frameReservas.setSize(new Dimension(702, 468));
frameReservas.setTitle("Menú Reservas");
frameReservas.setResizable(false);
frameReservas.setContentPane(getPanelReservas());
frameReservas.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
framePpal.setEnabled(true);
}
});
}
return frameReservas;
}
COM: <s> this method initializes frame reservas </s>
|
funcom_train/13439774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasListSymbols(String[] lines) {
for (int i=0; lines!=null && i<lines.length; i++) {
if (lines[i]!=null && lines[i].startsWith(PTools.LIST_SYMBOL)) {
return true;
}
}
return false;
}
COM: <s> returns if at least one line starts with the list symbol </s>
|
funcom_train/23288058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
if(mySocket != null){
while(!shouldStop){
try {
String str= bReader.readLine();
handlePacket(str);
} catch(Exception e){
client.debug("Server has gone offline, or stream error.");
client.protocol = null;
try{mySocket.close();} catch(Exception e2){System.out.println("Socket close fail."); System.exit(1);}
if(!client.Loading) client.loginScreen();
shouldStop = true;
}
}
}
}
COM: <s> constantly reads from the server </s>
|
funcom_train/20307058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean runTests(ReasonerFactory reasonerF, TestCase testcase, Resource configuration) throws IOException {
for (Iterator i = listTests().iterator(); i.hasNext(); ) {
String test = (String)i.next();
if (!runTest(test, reasonerF, testcase, configuration)) return false;
}
return true;
}
COM: <s> run all the tests in the manifest </s>
|
funcom_train/12587344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document buildDocument() {
Document document = new Document();
document.add(new Field("guid", m_anyItem.getItemIdentifier(), Field.Store.YES, Field.Index.NO));
document.add(new Field("versionCreated", DateTools.dateToString(m_anyItem.getItemMetadata().getVersionCreated()
.getTime(), Resolution.SECOND), Field.Store.YES, Field.Index.NO));
return document;
}
COM: <s> init document with any item elements which need to be update </s>
|
funcom_train/1953294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCmdEnginePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TimeLine_cmdEngine_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TimeLine_cmdEngine_feature", "_UI_TimeLine_type"),
TemporalPackage.Literals.TIME_LINE__CMD_ENGINE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the cmd engine feature </s>
|
funcom_train/39968110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createAndShowGUI(Container content, String title) {
// Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
// Create and set up the window.
JFrame frame = createFrame(content, title);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent event) {
close();
}
});
}
COM: <s> create the gui and show it </s>
|
funcom_train/13596225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPhonemes(Phoneme[] phonemes) {
//for (int i = 0; i < phonemes.length; i++) {
// if (phonemes[i] != null)
// System.out.println("set phonemes: " + phonemes[i].getName());
//}
//debug statements to sett phonemes beigng put.
this.phonemes = phonemes;
}
COM: <s> set the phonemes pronunciation for this word </s>
|
funcom_train/1377104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void createOrUpdate() {
CreditTransaction acc = new CreditTransaction();
acc.setCreateDate(new Date());
acc.setUpdateDate(new Date());
acc.setDescription("Äccount Test Two");
creditTransactionDAO.createOrUpdate(acc);
assertNotNull(acc.getId());
}
COM: <s> test if an credit transaction is being removed correctly </s>
|
funcom_train/27784252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private UserVO createUserVOFromResultSet(ResultSet rs) throws SQLException {
UserVO user = new UserVO(new Integer(rs.getInt("user_id")));
user.setEmail(rs.getString("email"));
user.setUserName(rs.getString("user_name"));
user.setPassword(rs.getString("password"));
return user;
}
COM: <s> takes a resultset and returns a user vo </s>
|
funcom_train/43039433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public USide getNeighborSide() {
USide neighborSide = null;
if (neighbor != null) {
if (sideMatch(neighbor.getAB(), triangle.id) == true)
neighborSide = neighbor.getAB();
else if (sideMatch(neighbor.getBC(), triangle.id) == true)
neighborSide = neighbor.getBC();
else if (sideMatch(neighbor.getCA(), triangle.id) == true)
neighborSide = neighbor.getCA();
}
return neighborSide;
}
COM: <s> get the neighbor side </s>
|
funcom_train/26176847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Map prepareMap (Map map) {
this.logger.debug("Preparing standard taglets.");
final Map newMap= new LinkedHashMap();
final Iterator i= map.keySet().iterator();
while (i.hasNext()) {
final String key= (String) i.next();
final Object taglet= map.get(key);
newMap.put(key, taglet);
sorter.addStandardTaglet(key);
i.remove();
this.logger.debug("- " + key);
}
this.logger.debug(
"Preparation complete, " + newMap.size() + " standard taglets seen."
);
return newMap;
}
COM: <s> prepares the installation map to be completely repopulated </s>
|
funcom_train/16528477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireCardMoved(int cardIndex, String moveType) {
CardShiftEvent evt = new CardShiftEvent( this, cardIndex, moveType );
Iterator<CardShiftListener> it = listeners.iterator();
while( it.hasNext() ) {
it.next().cardMoved( evt );
}// while
}
COM: <s> implementation of the listener </s>
|
funcom_train/49408805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DIDLSerializerType getDIDLSerializer() {
info.repo.didl.impl.serialize.DIDLSerializer serializer = new info.repo.didl.impl.serialize.DIDLSerializer();
serializer.getRegistry().addSerializer(MyContent.class,
MyContentSerializer.class);
serializer.getRegistry().addSerializer(DII.class, DII.class);
return serializer;
}
COM: <s> gets a didldeserializer instance initialized with the deserializers and content </s>
|
funcom_train/31503882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteCustomColumn(String name) {
// System.out.println("--- Delete --- (CustomColumnsManager)");
ganttTreeTable.deleteCustomColumn(name);
CustomColumEvent event = new CustomColumEvent(
CustomColumEvent.EVENT_REMOVE, name);
fireCustomColumnsChange(event);
}
COM: <s> delete the custom column whose name is given in parameter from the </s>
|
funcom_train/44811039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void executeSchemaStatement(Statement stmt, String sql) throws SQLException {
if (logger.isDebugEnabled()) {
logger.debug("Executing schema statement: " + sql);
}
try {
stmt.executeUpdate(sql);
}
catch (SQLException ex) {
if (logger.isWarnEnabled()) {
logger.warn("Unsuccessful schema statement: " + sql, ex);
}
}
}
COM: <s> execute the given schema sql on the given jdbc statement </s>
|
funcom_train/31947730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMillisecondsOffsetPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ESockEntry_millisecondsOffset_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ESockEntry_millisecondsOffset_feature", "_UI_ESockEntry_type"),
SailuserdataPackage.Literals.ESOCK_ENTRY__MILLISECONDS_OFFSET,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the milliseconds offset feature </s>
|
funcom_train/12562281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendRecordStoresToForm(String[] recordStores, Form form) {
StringItem item;
for (int i = 0; i < recordStores.length; i++) {
item = new StringItem(null, recordStores[i]);
item.setLayout(Item.LAYOUT_NEWLINE_AFTER | Item.LAYOUT_2);
form.append(item);
}
}
COM: <s> appends names of the record stores owned by the midlet suite </s>
|
funcom_train/5002127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResourceBundle getDefaultBundle() {
if (default_bundle == null) {
String s = getRessourcePrefix();
default_bundle = ResourceBundle.getBundle(s + Messages.Localizer_1, new Locale("en", "US")); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
}
return default_bundle;
}
COM: <s> gets the default bundle </s>
|
funcom_train/23869270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDesign(Design design){
this.design = design;
scene.setDesign(this.design);
scene.initializeScene(true, true);
scene.setDevice(design.getDevice());
scene.setWireEnumerator(design.getWireEnumerator());
// Create hard macro blocks
for(ModuleInstance mi : design.getModuleInstances()){
scene.addItem(new GuiModuleInstance(mi, scene, false));
}
}
COM: <s> updates the design </s>
|
funcom_train/11726073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeOperand(T operand) {
if (operands == null) {
return false;
}
// JCR-1650 search the operand without relying on Object#equals(Object)
Iterator it = operands.iterator();
while (it.hasNext()) {
if (it.next() == operand) {
it.remove();
return true;
}
}
return false;
}
COM: <s> removes an code operand code child node from this query node </s>
|
funcom_train/23075819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Annonces(java.awt.Frame parent, boolean modal) {
super(parent, modal);
initComponents();
BodyPanel.setViewportView(An_Body);
An_Body.setVisible(true);
//We add a listener
An_Body.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
Changed(evt);
}
});
}
COM: <s> creates new form annonces </s>
|
funcom_train/20818297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeNutrient(List<Integer> linha) throws PropertyVetoException {
DynamicTable model = (DynamicTable) registryTable.getModel();
for (Integer l : linha) {
model.removeRow(l.intValue());
}
createTable(new JTable(model));
setSelected(true);
pack();
}
COM: <s> remove as linhas selecionadas para exclusao da tabela </s>
|
funcom_train/9247991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
final String[] classpath = getSpringClasspath();
final ClassPathXmlApplicationContext context =
new ClassPathXmlApplicationContext(classpath, BrokerCommandLineRunner.class);
LOG.debug("Spring context loaded from classpath: " + ArrayUtils.toString(classpath));
// since our messaging container beans are lifecycle aware the application
// will immediately start processing
context.start();
}
COM: <s> initialises spring application context and auto starts </s>
|
funcom_train/4446784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void QuitVoiceChat(String FromUserName,String ToUserName)
{
System.out.println(FromUserName + "-->" + ToUserName);
clientobject = GetClientObject(ToUserName);
if(clientobject != null)
{
SendMessageToClient(clientobject.getSocket(),"QVCT "+ FromUserName + "~" + ToUserName);
}
}
COM: <s> function to quit voice chat </s>
|
funcom_train/16304997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getUpperCoordinate() {
for (int i = 0; i < image.getHeight(); i++) {
for (int j = 0; j < image.getWidth(); j++) {
if (image.getRGB(j, i) != -1) {
return i - 1;
}
}
}
throw new RuntimeException("No drawing could be founded, try writing again");
}
COM: <s> this method finds out what is the upper coordinate of the drawn letter </s>
|
funcom_train/8716489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEndCap(int capstyle) {
PDFChangeStrokeCmd sc = new PDFChangeStrokeCmd();
int cap = BasicStroke.CAP_BUTT;
switch (capstyle) {
case 0:
cap = BasicStroke.CAP_BUTT;
break;
case 1:
cap = BasicStroke.CAP_ROUND;
break;
case 2:
cap = BasicStroke.CAP_SQUARE;
break;
}
sc.setEndCap(cap);
addCommand(sc);
}
COM: <s> set the end cap style </s>
|
funcom_train/534666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateLocation() {
int x = mapView.latitudeToPixels(beacon.highestRssi.gpsLL.getLatitude());
int y = mapView.longitudeToPixels(beacon.highestRssi.gpsLL.getLongitude());
if(x != this.getOriginalLocation().x || y != this.getOriginalLocation().y) {
this.setLocation(new Point(x, y));
}
}
COM: <s> tells the beacon place that the beacon history that it owns has had </s>
|
funcom_train/11375459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPreadLocalFS() throws IOException {
Configuration conf = new HdfsConfiguration();
FileSystem fileSys = FileSystem.getLocal(conf);
try {
Path file1 = new Path("build/test/data", "preadtest.dat");
writeFile(fileSys, file1);
pReadFile(fileSys, file1);
cleanupFile(fileSys, file1);
} finally {
fileSys.close();
}
}
COM: <s> tests positional read in local fs </s>
|
funcom_train/33991033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init(float x, float y, float z, float u, float v, String type) {
this.type = type;
this.x = x;
this.y = y;
this.z = z;
this.u = u;
this.v = v;
vTriangles = new Vector<FTriangle>();
normal = new FVertex();
}
COM: <s> this function is called from within the constructors </s>
|
funcom_train/35712988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUrl(URL url) {
this.url = url;
this.cache.clear();
try {
jaxbContext = JAXBContext.newInstance(Blueprint.class,
Element.class);
Unmarshaller um = jaxbContext.createUnmarshaller();
blueprint = (Blueprint) um.unmarshal(url);
} catch (JAXBException e) {
logger.error(
"Unable to unmarshal URL [{}] into blueprint bean for taxonomy",
url);
throw new InfrastructureException(
String.format(
"Unable to unmarshal URL [%s] into blueprint bean for taxonomy: ",
url), e);
}
}
COM: <s> set url then roll data into blueprint bean for taxonomy </s>
|
funcom_train/44536118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTo(String s) {
StringTokenizer str = new StringTokenizer(s, ",;");
to = new String[str.countTokens()];
int index = 0;
while (str.hasMoreTokens()) {
to[index++] = str.nextToken();
}
}
COM: <s> parses a to string to set field array </s>
|
funcom_train/3120974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parseRelationAndValue(Condition cond, Tuple tCond) {
String strRelation = tCond.getAttribute(Condition.COND_RELATION);
cond.setRelation(parseRelation(strRelation));
String strVal = tCond.getAttribute(Condition.COND_VALUE);
cond.setRelationValue(strVal);
} // of method
COM: <s> parse the relation and value </s>
|
funcom_train/48414655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cookie getCookie(HttpServletRequest request, String name) {
Cookie cookies[] = request.getCookies();
for (int i = 0; cookies != null && i < cookies.length; i++) {
if (cookies[i].getName().equals(name)) {
return cookies[i];
}
}
return null;
}
COM: <s> helper method for get user to extract user from request cookie session </s>
|
funcom_train/35112003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public P get() {
P projectile = null;
for (P p: pool) {
if (p.isDead()) {
log.finer("recycling projectile");
projectile = p;
}
}
if (projectile == null) {
log.info("creating new projectile, pool size: " +pool.size());
projectile = newInstance();
pool.add(projectile);
}
projectile.getNode().activate();
projectile.setDead(false);
EntityManager.get().addEntity(projectile);
projectile.setAge(projectile.getLifeTime());
return projectile;
}
COM: <s> returns a projectile from the pool </s>
|
funcom_train/40731721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setlVerticalScrollBarProxy(IScrollBarProxy scroll) {
checkWidget();
if (getVerticalBar() != null) {
return;
}
vScroll = scroll;
vScroll.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
onScrollSelection();
}
public void widgetDefaultSelected(SelectionEvent e) {
}
});
}
COM: <s> sets the external vertical scrollbar </s>
|
funcom_train/33931446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateData() {
retireText.setText("");
MessageFormat retireMsg = new MessageFormat("");
retireMsg.setLocale(currentLocale);
retireMsg.applyPattern(resStrings.getString("retire"));
for (int i = info.getCurrentAge(); i <= info.getDeathAge(); i++) {
Object[] args = { i, info.getBalance(i) };
retireText.append(retireMsg.format(args) + "\n");
}
}
COM: <s> updates the data displayed in the text area </s>
|
funcom_train/45130041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTmpFilePath() {
String tmpFilePath = getServletContext().getInitParameter("tmpFilePath");
if (tmpFilePath == null)
throw new WebException("Please specify the path for temporary files using the web.xml property 'tmpFilePath'");
return getRelativePath(tmpFilePath);
}
COM: <s> returns the temporary file directory used for file uploads </s>
|
funcom_train/50878708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage(Image inImage){
myImage = inImage;
myWidth = inImage.getWidth(myObserver);
myHeight = inImage.getHeight(myObserver);
if (myWidth > 0)myHalfWidth = myWidth/2;
else myHalfWidth = 0;
if (myHeight > 0) myHalfHeight = myHeight/2;
else myHalfHeight = 0;
}
COM: <s> set the iamge </s>
|
funcom_train/7470099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProhibitedPhrase(String[] terms, String field) {
if (terms.length == 0) { // ignore empty phrase
} else if (terms.length == 1) {
addProhibitedTerm(terms[0], field); // optimize to term query
} else {
clauses.add(new Clause(new Phrase(terms), field, false, true, this.conf));
}
}
COM: <s> add a prohibited phrase in the specified field </s>
|
funcom_train/2803793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanup() throws Exception {
logCurrentMemoryUsage("before cleanup");
Session session = Persistence.getHibernateSession();
if (session != null) {
try {
session.close();
}
catch (HibernateException e1) {
log.error("Error closing connection", e1);
}
}
logCurrentMemoryUsage("after cleanup");
}
COM: <s> close the hibernate session </s>
|
funcom_train/45897884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
stop();
radarHandler = register(1000, new Act() {
@Override
public void act() {
world.statistics.playTime++;
if (!paused()) {
world.statistics.simulationTime++;
}
Radar.compute(world);
if (control.primary() == Screens.STARMAP) {
control.repaintInner();
}
}
});
resume();
allocatorHandler = register(1000, new Act() {
@Override
public void act() {
Allocator.compute(world, pool);
control.repaintInner();
}
});
Allocator.compute(world, pool);
Radar.compute(world);
timer.start();
playRegularMusic();
}
COM: <s> start the timed actions </s>
|
funcom_train/6410693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildPreferenceDefaults() {
MsliApplicationPlugin plugin = MsliApplicationService.getPlugin();
MsliPreferenceService prefService = plugin.getPreferenceService();
IScopeContext scope = MsliPrefUtils.newScope(PrefScope.DEFAULT);
prefService.setPreferences(scope,
PackageProps.STARTUP_PREF_PATH,
StartupPreferences.getDefaults());
prefService.setPreferences(scope,
PackageProps.SHUTDOWN_PREF_PATH,
ShutdownPreferences.getDefaults());
prefService.setPreferences(scope,
PackageProps.WORKSPACE_PREF_PATH,
WorkspacePreferences.getDefaults());
prefService.setPreferences(scope,
PackageProps.APPLICATION_PREF_PATH,
ApplicationPreferences.getDefaults());
// PreferenceUtils.reportPreferences(System.out,
// "Application: Defaults...", root);
}
COM: <s> builds the application preference defaults </s>
|
funcom_train/7615333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAccelerationPriority(float priority) {
if (priority < 0 || priority > 1) {
// awt.10A=Priority must be a value between 0 and 1, inclusive
throw new IllegalArgumentException(Messages.getString("awt.10A")); //$NON-NLS-1$
}
accelerationPriority = priority;
}
COM: <s> sets the acceleration priority for this image </s>
|
funcom_train/2266388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DaoEditorBean getContentPane() {
if (tAdresseEditor == null) {
tAdresseEditor = new DaoEditorBean(this);
tAdresseEditor.setDaoDelegate(daoDelegate);
tAdresseEditor.addTableColumn("Id"); // must be!!
tAdresseEditor.addTableColumn("Plz");
tAdresseEditor.addTableColumn("Ort");
tAdresseEditor.addTableColumn("Strasse");
tAdresseEditor.setBounds(new java.awt.Rectangle(550, 7, 587,
630));
tAdresseEditor.refreshView();
}
return tAdresseEditor;
}
COM: <s> this method initializes t adresse editor </s>
|
funcom_train/8074282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String printPopChrom(BitSet temp) {
StringBuffer text = new StringBuffer();
for (int j=0;j<m_numAttribs;j++) {
if (temp.get(j)) {
text.append("1");
} else {
text.append("0");
}
}
return text.toString();
}
COM: <s> prints a population members chromosome </s>
|
funcom_train/2022902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invalidate() {
int rows;
// calculate the number of rows
rows = 1;
if (getShowDriver())
rows++;
if (getShowConnect())
rows++;
if (getShowTables())
rows++;
if (getShowColumns())
rows++;
((GridLayout) getLayout()).setRows(rows);
super.invalidate();
}
COM: <s> invalidates the container </s>
|
funcom_train/27761421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInstantiate() {
try {
JavaBean jb = new JavaBean(Bean1.class, true);
Object bean1 = jb.instantiate();
assertTrue("Should be an instance of Bean1", bean1 instanceof Bean1);
} catch (BeanException be) {
fail(be.toString());
}
}
COM: <s> tests the instantiate method </s>
|
funcom_train/44556846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getValue(String column, int row) {
if (row<0 || row>=getCounter())
throw new IllegalArgumentException("Row out of range");
int col = getColumnIndex(column);
if (col==ResultsTable.COLUMN_NOT_FOUND)
throw new IllegalArgumentException("\""+column+"\" column not found");
//IJ.log("col: "+col+" "+(col==COLUMN_NOT_FOUND?"not found":""+columns[col]));
return getValueAsDouble(col,row);
}
COM: <s> returns the value of the specified column and row where </s>
|
funcom_train/8073192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double optimalAveragePrecision(FrequencyVector<T, ?> trueFrequencies) {
double bestAP = 0;
for (int i = 1; i < trueFrequencies.sortedTerms.size(); i++) {
double ap = averagePrecision(trueFrequencies.sortedTerms().subList(0, i));
if (ap > bestAP) bestAP = ap;
}
return (bestAP);
}
COM: <s> computes the average precision shuffling subsets to get an optimal value </s>
|
funcom_train/18551123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String resolveFullPathName(String pFullPathName) {
StringTokenizer tokenizer = new StringTokenizer(pFullPathName, ".");
String className = "";
String token = "";
int count = 0;
while (tokenizer.hasMoreTokens()) {
token = tokenizer.nextToken();
if (!tokenizer.hasMoreTokens()) {
className = token;
}
}
return className;
}
COM: <s> refactored common code for both resolve class name string </s>
|
funcom_train/42048593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getInformationPanel() {
if (informationPanel == null) {
iconLabel = new JLabel();
iconLabel.setHorizontalAlignment(SwingConstants.CENTER);
iconLabel.setHorizontalTextPosition(SwingConstants.CENTER);
GridLayout gridLayout1 = new GridLayout();
gridLayout1.setRows(2);
gridLayout1.setHgap(3);
gridLayout1.setColumns(1);
informationPanel = new JPanel();
informationPanel.setLayout(gridLayout1);
informationPanel.add(iconLabel, null);
informationPanel.add(getStatusTextArea(), null);
}
return informationPanel;
}
COM: <s> this method initializes information panel </s>
|
funcom_train/29828709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean collectOpenWindows(boolean connected) {
if (mainFrame == null) return false;
if (connected) {
conOpenWindows = new Vector();
mainFrame.addOpenWindows(conOpenWindows, connected);
}
else {
disconOpenWindows = new Vector();
mainFrame.addOpenWindows(disconOpenWindows, connected);
}
return true;
}
COM: <s> saves open windows into properties file </s>
|
funcom_train/25187123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetReflectiveBuilder() {
System.out.println("setReflectiveBuilder");
ReflectiveBuilder rb = new JSONSchemaReflectiveBuilder();
BigFactory instance = BigFactory.getInstance(null, null, null);
assertNull(instance.getReflectiveBuilder());
instance.setReflectiveBuilder(rb);
assertSame(rb, instance.getReflectiveBuilder());
}
COM: <s> test of set reflective builder method of class big factory </s>
|
funcom_train/3903786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOperatorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RuleConditionType_operator_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RuleConditionType_operator_feature", "_UI_RuleConditionType_type"),
ImsssPackage.Literals.RULE_CONDITION_TYPE__OPERATOR,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the operator feature </s>
|
funcom_train/23791936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getNode(int nodeId) {
if(isRegistered) {
Object[] arg = {incoming_port, name, nodeId};
OSCMessage msg = new OSCMessage("/get/node", arg);
out.send(msg);
} else {
if(verbo > 2) System.err.println("\nSenseWorldDataNetwork warning: the client is not yet registered. Cannot query nodes.");
}
}
COM: <s> asks a node for the data it contains </s>
|
funcom_train/3340600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setViewportExtents(Dimension size) {
if (_headerViewport != null) {
_headerViewport.setExtentSize(size.width, 1);
_childViewport.setExtentSize(size.width, size.height - 1);
} else {
_childViewport.setExtentSize(size.width, size.height);
}
}
COM: <s> sets the size of the visible part of the view </s>
|
funcom_train/15558105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove() {
if (_myParent != null) {
_myParent.remove(this);
}
if (controlP5 != null) {
controlP5.remove(this);
}
for (int i = controllers.size() - 1; i >= 0; i--) {
controllers.get(i).remove();
}
controllers.clear();
controllers.clearDrawable();
controllers = new ControllerList();
if (this instanceof Tab) {
_myControlWindow.removeTab((Tab) this);
}
}
COM: <s> remove the controller from control p5 </s>
|
funcom_train/35947416 | /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 (this == obj)
return true;
if (!(obj instanceof Text))
return false;
final Text that = (Text) obj;
if (this._count != that._count)
return false;
for (int i = 0; i < _count;) {
if (this.charAt(i) != that.charAt(i++))
return false;
}
return true;
}
COM: <s> compares this text against the specified object for equality </s>
|
funcom_train/8077318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCompatibilityState() {
String result = "-X " + m_NumFolds + " " ;
if (m_SplitEvaluator == null) {
result += "<null SplitEvaluator>";
} else {
result += "-W " + m_SplitEvaluator.getClass().getName();
}
return result + " --";
}
COM: <s> gets a description of the internal settings of the result </s>
|
funcom_train/36840923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Timing next() {
if (quantity <= 0) {
throw new RuntimeException("TTIterator screwed up some.");
}
Timing ret = current;
quantity--;
if (quantity == 0) {
current = times.higherKey(current);
if (current != null) {
quantity = times.get(current);
}
}
return ret;
}
COM: <s> get the next chronological timing </s>
|
funcom_train/13666624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
Map<String, String> config = loadAllConfig();
initDefaultLocale(config.get("locale.default"));
initMailSender(config);
initAttachmentMaxSize(config.get("attachment.maxsize"));
initSessionTimeout(config.get("session.timeout"));
}
COM: <s> this is automatically called by spring init method hook on </s>
|
funcom_train/331133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PamControlledUnitSettings findGeneralSettings(String unitType) {
if (databaseSettingsList == null) {
return null;
}
for (int i = 0; i < databaseSettingsList.size(); i++) {
if (databaseSettingsList.get(i).getUnitType().equalsIgnoreCase(unitType)) {
return databaseSettingsList.get(i);
}
}
return null;
}
COM: <s> searches a list of settings for settings with a </s>
|
funcom_train/7528498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void marshallTransientState(InternalNode node, ObjectOutputStream out) throws Exception {
List<NodeData> nodeData = new LinkedList<NodeData>();
generateNodeDataList(node, nodeData);
cache.getMarshaller().objectToObjectStream(nodeData, out, node.getFqn());
}
COM: <s> do a preorder traversal visit the node first then the nodes children </s>
|
funcom_train/49792070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showUser(String username) {
int index = userList.indexOf(username);
if(index != -1) {
tabPanel.selectTab(index);
return;
}
ViewUserPanel panel = new ViewUserPanel(this, username);
tabPanel.add(panel, username);
int newIndex = tabPanel.getWidgetCount() - 1;
tabPanel.selectTab(newIndex);
userList.add(username);
}
COM: <s> shows a users info on a new tab </s>
|
funcom_train/10906796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeCMap() throws IOException {
writeCIDInit();
writeCIDSystemInfo("Adobe", "UCS", 0);
writeName("Adobe-Identity-UCS");
writeType("2");
writeCodeSpaceRange(singleByte);
writeBFEntries();
writeWrapUp();
}
COM: <s> writes the cmap to a writer </s>
|
funcom_train/4900997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOnReadyStateChange(PropertyChangeListener listener) {
PropertyChangeListener old = getOnReadyStateChange();
removeReadyStateChangeListener(old);
addReadyStateChangeListener(listener);
onReadyStateChange = listener;
firePropertyChange("onReadyStateChange", old, listener);
}
COM: <s> sets the listener to use for ready state change event notification </s>
|
funcom_train/51533520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadImagesCache(String[] names) {
for (int i = 0; i < names.length; i++) {
try {
if (names[i] != null) {
InputStream is = getClass().getResourceAsStream("data/" + names[i] + ".png");
imageCache.put(names[i], Image.createImage(is));
}
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
}
COM: <s> batch load images into cache </s>
|
funcom_train/23853143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showTooltipDialog(MainWindow window) {
TooltipConfigurationDialog dialog = new TooltipConfigurationDialog(window.getFrame(), session.getDbSession()
.getDataset(), configManager.getGlobalConfig());
dialog.setVisible(true);
configManager.updateGlobalConfig(session.getViewManager().getAllViews());
}
COM: <s> shows the tooltip configuration dialog </s>
|
funcom_train/45642718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setEnvironmentInformations() {
date = new Date();
for (Map.Entry<?, ?> propertyEntry : System.getProperties().entrySet()) {
systemProperties.put(propertyEntry.getKey().toString(), propertyEntry.getValue().toString());
}
systemProperties.putAll(System.getenv());
}
COM: <s> copies the environment informations </s>
|
funcom_train/13258298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addJob(JobAnimation newJob) {
jobAnimations.add(newJob);
newJob.setPosition(0);
newJob.setRepaint(true);
//centers job to starting point of this edge
Rectangle jobSize = newJob.getBounds();
Point p = new Point(anglePoints[0].x - jobSize.width / 2, anglePoints[0].y - jobSize.height / 2);
newJob.getBounds().setLocation(p);
newJob.resetTimeOfEntrance();
}
COM: <s> puts another job on this edge </s>
|
funcom_train/25577018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
DockModel dockModel = RDockMinimizer.createDockModel(parent);
if (dockModel == null)
return;
IComponent master = parent;
while (master.getParent() != null)
master = master.getParent();
Component c = ((RComponent) master).getImpl();
if (!(c instanceof Window))
return;
Window frame = (Window) c;
dockModel.addVisualizer("maximizePanel", this, frame);
}
COM: <s> inits the dock model and adds as visualizer to the parent container </s>
|
funcom_train/37590099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetToDefault() {
_setSelected(OptionConstants.TOOLBAR_TEXT_ENABLED.getDefault().booleanValue(),
OptionConstants.TOOLBAR_ICONS_ENABLED.getDefault().booleanValue(),
OptionConstants.TOOLBAR_ENABLED.getDefault().booleanValue());
}
COM: <s> selects the radio button corresponding to the default values </s>
|
funcom_train/34959009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setRecentOpened(String group) {
if (!recentPrefs.get("recent1", "").equals(group)) {
recentPrefs.put("recent4", recentPrefs.get("recent3", ""));
recentPrefs.put("recent3", recentPrefs.get("recent2", ""));
recentPrefs.put("recent2", recentPrefs.get("recent1", ""));
recentPrefs.put("recent1", group);
this.getRecentOpened();
}
}
COM: <s> add a opened group to recent opened </s>
|
funcom_train/2479988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MainPanel getMainPanel() {
if (mainPanel == null) {
mainPanel = new MainPanel(this.rb);
mainPanel.setOpaque(false);
mainPanel.setLayout(new TableLayout(new double[][]{{20,100,20,TableLayout.FILL,20},{20,TableLayout.FILL,20}}));
mainPanel.add(getButtonPanel(),"1,1");
mainPanel.add(getContentPanel(),"3,1");
}
return mainPanel;
}
COM: <s> this method initializes main panel </s>
|
funcom_train/19432190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeCard(final Card card) {
suitCount.put(card.getSuit(), suitCount.get(card.getSuit()) - 1);
suitPoints.put(card.getSuit(), suitCount.get(card.getSuit()) - card.getRank().getPoints());
}
COM: <s> removes a card from the suit point counter </s>
|
funcom_train/39871720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadUrl(String url, Map<String, String> extraHeaders) {
mLoadInitFromJava = true;
if (URLUtil.isJavaScriptUrl(url)) {
// strip off the scheme and evaluate the string
stringByEvaluatingJavaScriptFromString(
url.substring("javascript:".length()));
} else {
nativeLoadUrl(url, extraHeaders);
}
mLoadInitFromJava = false;
}
COM: <s> load a url from the network or the filesystem into the main frame </s>
|
funcom_train/3326213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resolveCollisions(int col_) {
Channel c = getVC(col_);
int n = c.getNumSlots();
for (int i = 0; i < n; i++) {
GBox box1 = c.getGBox(i);
if (box1 == null)
continue;
// FIXME: maybe a bit slow and always resolves in downward direction
// => use better algorithm, try upward as well
int yhint = box1.getYPos();
while (collides(col_, i)) {
yhint += 5;
box1.setYHint(yhint);
}
}
}
COM: <s> usefull to resolve primary port collisions after hinting </s>
|
funcom_train/784796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
Section theOther = (Section) other;
return(theOther.getName().equals(name) &&
theOther.getPercentualInterval().equals(percentualInterval) &&
theOther.getUnitsInterval().equals(unitsInterval) &&
theOther.getUnits().equals(units));
}
COM: <s> compares two section using all their fields and sets </s>
|
funcom_train/13647960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logout() {
if (this.session != null) {
if (this.session.isConnected()) {
QuitRequest quitRequest = new QuitRequest();
quitRequest.setUser(this.user.getName());
this.session.write(quitRequest);
}
this.session.close(false);
}
this.host = null;
}
COM: <s> performs a logout closes the session </s>
|
funcom_train/1590186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long set(long instant, int era) {
FieldUtils.verifyValueBounds(this, era, DateTimeConstants.BCE, DateTimeConstants.CE);
int oldEra = get(instant);
if (oldEra != era) {
int year = iChronology.getYear(instant);
return iChronology.setYear(instant, -year);
} else {
return instant;
}
}
COM: <s> set the era component of the specified time instant </s>
|
funcom_train/44975754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doAddOneFileApi(WizardParameter wp) {
if (wp.arg instanceof Object[]) {
Object[] wpa = (Object[]) wp.arg;
if (wpa.length >= 2 && wpa[0] instanceof IndexingHugger
&& wpa[1] instanceof File) {
theIndexer
.addOneFileApi((IndexingHugger) wpa[0], (File) wpa[1]);
}
}
}
COM: <s> void do add one file api indexing hugger a file b wp </s>
|
funcom_train/9699919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSerializeCache() throws Exception {
Project pr1 = projects[0];
controller.setActiveProject(pr1);
Project activeProject = controller.getActiveProject();
activeProject.setCachePath(IDEController.generateNewCacheFileName("."));
activeProject.getProjectLoader().build();
assertCacheExists(activeProject);
assertTrue(controller.serializeProjectCache(activeProject, false));
activeProject.getProjectLoader().getAstTreeCache().cleanAll();
controller.deserializeCache(false);
Thread.sleep(100);
assertCacheExists(activeProject);
}
COM: <s> tests cache serializing and deserializing </s>
|
funcom_train/41782453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadImages(){
try{
_imgShade = Image.createImage( IMG_PATH_SHADING );
_imgLoading = Image.createImage( IMG_PATH_LOADING );
}
catch( IOException ioe ){
System.out.println( "WidgetTest.loadImages; error loading images. " + ioe.toString() );
}
}
COM: <s> loads images required for the controller </s>
|
funcom_train/30189997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName( String in ) {
name = in.replaceAll(" ","_");
//if(name.endsWith(".java")) name = name.replaceAll("\\.java","");
//if(name.endsWith(".jar")) name = name.replaceAll("\\.jar","");
name = name.replaceAll("\\.","_");
logger.trace("Script name changed to: "+ name);
javaFileName = new String(name +".java");
//jarFileName = new String(name + ".jar");
}
COM: <s> set the script name and file names </s>
|
funcom_train/7640258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private LayoutParamsInfo _getLayoutParamsInfo(Class<?> layoutParamsClass) throws Exception {
Method method = LayoutParamsParser.class.getDeclaredMethod("getLayoutParamsInfo", //$NON-NLS-1$
IClassDescriptor.class);
method.setAccessible(true);
return (LayoutParamsInfo) method.invoke(mParser, new ClassWrapper(layoutParamsClass));
}
COM: <s> calls the private get layout params info of the parser </s>
|
funcom_train/11591769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderColumnHeaderRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, String headerStyleClass) throws IOException {
if (determineRenderFacet(component, true)) {
super.renderColumnHeaderRow(facesContext, writer, component, headerStyleClass);
}
}
COM: <s> renders the column header </s>
|
funcom_train/20221054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRootText(final String messageText) {
if (messageText == null) {
final ResourceBundle resources = ResourceBundle.getBundle(
CheckStyleConstants.RESOURCE_BUNDLE);
visibleRootNode.setUserObject(new ResultTreeNode(resources.getString("plugin.results.no-scan")));
} else {
visibleRootNode.setUserObject(new ResultTreeNode(messageText));
}
nodeChanged(visibleRootNode);
}
COM: <s> set the root message </s>
|
funcom_train/4528118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBlockCorruptionRecoveryPolicy() throws IOException {
// Test recovery of 1 corrupt replica
LOG.info("Testing corrupt replica recovery for one corrupt replica");
blockCorruptionRecoveryPolicy(4, (short)3, 1);
// Test recovery of 2 corrupt replicas
LOG.info("Testing corrupt replica recovery for two corrupt replicas");
blockCorruptionRecoveryPolicy(5, (short)3, 2);
}
COM: <s> test block corruption recovery policy </s>
|
funcom_train/2994759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URL getHTMLUrl(String name) {
URL url=null;
try {
url = frame.getClass().getResource("/html/" + name);
}
catch(Exception e) {
Utils.oops(frame,"Impossible to load the About content.\nSomething's wrong with the installation.");
}
return url;
}
COM: <s> returns a html page which is found in a valid image url </s>
|
funcom_train/29773947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAbsURL() throws Exception {
String parentPath = "file:/c:/foo/bar.xslt";
String childPath = "stubs.xml";
URL expResult = new URL("file:/c:/foo/stubs.xml");
URL result = FileUtil.getAbsURL(parentPath, childPath);
assertEquals(expResult, result);
}
COM: <s> test of get abs url method of class net </s>
|
funcom_train/42475490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateStatus(Long enzymeId, Status status, Connection con) throws SQLException {
PreparedStatement updateStatusStatement = null;
try {
updateStatusStatement = con.prepareStatement(updateStatusStatement());
updateStatusStatement.setString(1, status.getCode());
updateStatusStatement.setLong(2, enzymeId.longValue());
updateStatusStatement.execute();
} finally {
updateStatusStatement.close();
}
}
COM: <s> updates the status of the given enzyme </s>
|
funcom_train/22034040 | /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 || !(obj instanceof Text)) {
return false;
}
String objValue = ((Text)obj).getValue();
if (Value == null) {
return (objValue == null);
}
if (objValue == null) {
return false;
}
return objValue.equals(Value);
}
COM: <s> indicates if this text is semantically identical to an object </s>
|
funcom_train/50869414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSaveCommentToClipboard(boolean saveCommentToClipboard) {
this.saveCommentsToClipboard = saveCommentToClipboard;
int saveToClipboard = 0; //false
if(saveCommentToClipboard == true){
saveToClipboard = 1;
}
preferences.putInt(CONFIGURATION_COMMENTS_TO_CLIPBOARD_ENTRY, saveToClipboard);
}
COM: <s> sets whether to save the history comments to the system clipboard </s>
|
funcom_train/8374722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void build(Criteria criteria) {
if (filterState.getLogin() != null) {
criteria.add(Restrictions.ilike("login", filterState.getLogin(), MatchMode.START));
}
if (filterState.getFullName() != null) {
criteria.add(Restrictions.ilike("fullName", filterState.getFullName(), MatchMode.START));
}
}
COM: <s> apply filter to criteria </s>
|
funcom_train/36955929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IRubyScript getWorkingCopy(IEditorInput input, boolean primaryOnly) {
IRubyScript unit= fMap == null ? null : (IRubyScript) fMap.get(input);
if (unit == null)
unit= fDocumentProvider.getWorkingCopy(input);
if (unit != null && (!primaryOnly || RubyModelUtil.isPrimary(unit)))
return unit;
return null;
}
COM: <s> returns the working copy remembered for the compilation unit encoded in the </s>
|
funcom_train/18336790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectName getObjectName() throws MalformedObjectNameException {
String assembledName = getDomain().getDomainName() + ":name=" + getName();
for(String key : getProperties().keySet())
assembledName += "," + key + "=" + getProperties().get(key);
ObjectName objectName = new ObjectName(assembledName);
return objectName;
}
COM: <s> computes the object name from information in this </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.