<commit_before>OpenLayers.Tile.Image = Class.create();
OpenLayers.Tile.Image.prototype = 
  Object.extend( new OpenLayers.Tile(), {
    
    // {DOMElement} img
    img:null,
    
    initialize: function(bounds,url,size) {
        OpenLayers.Tile.prototype.initialize.apply(this,arguments);
    },

    draw:function() {
        OpenLayers.Tile.prototype.draw.apply(this, arguments);
        this.img = OpenLayers.Util.createImage(this.url,
                                 this.size);
    },
    /*
     * @param OpenLayers.Pixel
     */
    setPosition:function(point) {
        this.img.style.top = point.y+"px";
        this.img.style.left = point.x+"px";
        this.img.style.position = "absolute";
        this.position = point;
    },
    getPosition: function() {
        return this.position;
    }
  }
);<commit_msg>Can't setPosition before image exists.<commit_after>OpenLayers.Tile.Image = Class.create();
OpenLayers.Tile.Image.prototype = 
  Object.extend( new OpenLayers.Tile(), {
    
    // {DOMElement} img
    img:null,
    
    initialize: function(bounds,url,size) {
        OpenLayers.Tile.prototype.initialize.apply(this,arguments);
    },

    draw:function() {
        OpenLayers.Tile.prototype.draw.apply(this, arguments);
        this.img = OpenLayers.Util.createImage(this.url,
                                 this.size);
    },
    /*
     * @param OpenLayers.Pixel
     */
    setPosition:function(point) {
        if (img) {
            this.img.style.top = point.y+"px";
            this.img.style.left = point.x+"px";
            this.img.style.position = "absolute";
            this.position = point;
        }
    },
    getPosition: function() {
        return this.position;
    }
  }
);
{'fraction_non_alphanumeric': 0.1400462962962963, 'fraction_numerical': 0.0, 'mean_word_length': 2.0765124555160144, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '788621', 'n_tokens_mistral': 550, 'n_tokens_neox': 528, 'n_words': 72}