<commit_before>package com.gildedrose;

class GildedRose {
    Item[] items;

    public GildedRose(Item[] items) {
        this.items = items;
    }

    private void decreaseQuality(Item item) {
        if (item.quality <= 0) return; 
        item.quality--;
    }

    private void increaseQuality(Item item) {
        if (item.quality >= 50) return; 
        item.quality++;
    }
    
    public void updateQuality() {
        for (int i = 0; i < items.length; i++) {
            Item currentItem = items[i];
            
			if (currentItem.name.equals("Aged Brie") || currentItem.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
        			increaseQuality(currentItem);
            } else {
                if (currentItem.name.equals("Sulfuras, Hand of Ragnaros")) {

                } else {
                    decreaseQuality(currentItem);
                }
            }

            if (currentItem.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
                if (currentItem.sellIn < 11) {
            			increaseQuality(currentItem);
                }
                if (currentItem.sellIn < 6) {
            			increaseQuality(currentItem);
                }
            }
            
            if (currentItem.name.equals("Sulfuras, Hand of Ragnaros")) {

            } else {
                currentItem.sellIn--;
            }

            if (currentItem.sellIn < 0) {
                if (currentItem.name.equals("Aged Brie")) {
        				increaseQuality(currentItem);
                } else {
                    if (currentItem.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
                        currentItem.quality = 0;
                    } else {
                        if (currentItem.name.equals("Sulfuras, Hand of Ragnaros")) {

                        } else {
                            decreaseQuality(currentItem);
                        }
                    }
                }
            }
        }
    }
}<commit_msg>Convert each if/else in a sequence of if/else if/else at the same level of branching<commit_after>package com.gildedrose;

class GildedRose {
    Item[] items;

    public GildedRose(Item[] items) {
        this.items = items;
    }

    private void decreaseQuality(Item item) {
        if (item.quality <= 0) return; 
        item.quality--;
    }

    private void increaseQuality(Item item) {
        if (item.quality >= 50) return; 
        item.quality++;
    }
    
    public void updateQuality() {
        for (int i = 0; i < items.length; i++) {
            Item currentItem = items[i];
            
			if (currentItem.name.equals("<NAME>") || currentItem.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
        			increaseQuality(currentItem);
            } else if (currentItem.name.equals("Sulfuras, Hand of Ragnaros")) {

            } else {
                decreaseQuality(currentItem);
            }

            if (currentItem.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
                if (currentItem.sellIn < 11) {
            			increaseQuality(currentItem);
                }
                if (currentItem.sellIn < 6) {
            			increaseQuality(currentItem);
                }
            }
            
            if (currentItem.name.equals("Sulfuras, Hand of Ragnaros")) {

            } else {
                currentItem.sellIn--;
            }

            if (currentItem.sellIn < 0) {
                if (currentItem.name.equals("<NAME>")) {
        				increaseQuality(currentItem);
                } else if (currentItem.name.equals("Backstage passes to a TAFKAL80ETC concert")) {
                    currentItem.quality = 0;
                } else if (currentItem.name.equals("Sulfuras, Hand of Ragnaros")) {

                } else {
                    decreaseQuality(currentItem);
                }
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.10355407824085912, 'fraction_numerical': 0.0076706724622858605, 'mean_word_length': 1.4088669950738917, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4720096', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1044, 'n_words': 226}