type
stringclasses
1 value
dataset
stringclasses
1 value
input
stringlengths
75
160k
instruction
stringlengths
117
171
output
stringlengths
88
168k
Inversion-Mutation
megadiff
"public void free(int addr) { boolean found = false; // Reverse lookup on blockList, get SysMemInfo and call free for (Iterator<SysMemInfo> it = blockList.values().iterator(); it.hasNext();) { SysMemInfo info = it.next(); if (info.addr == addr) { found = true; it.remove(); free(info); break; } } if (!found) { // HLE modules using malloc should also call addSysMemInfo Modules.log.warn("pspSysMem.free(addr) failed to find SysMemInfo for addr:0x" + Integer.toHexString(addr)); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "free"
"public void free(int addr) { boolean found = false; // Reverse lookup on blockList, get SysMemInfo and call free for (Iterator<SysMemInfo> it = blockList.values().iterator(); it.hasNext();) { SysMemInfo info = it.next(); if (info.addr == addr) { found = true; <MASK>free(info);</MASK> it.remove(); break; } } if (!found) { // HLE modules using malloc should also call addSysMemInfo Modules.log.warn("pspSysMem.free(addr) failed to find SysMemInfo for addr:0x" + Integer.toHexString(addr)); } }"
Inversion-Mutation
megadiff
"@Inject PushReplication(final Injector i, final WorkQueue wq, final SitePaths site, final ReplicationUser.Factory ruf, final SchemaFactory<ReviewDb> db, final GitRepositoryManager grm, GroupCache gc) throws ConfigInvalidException, IOException { injector = i; workQueue = wq; database = db; replicationUserFactory = ruf; gitRepositoryManager = grm; groupCache = gc; configs = allConfigs(site); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "PushReplication"
"@Inject PushReplication(final Injector i, final WorkQueue wq, final SitePaths site, final ReplicationUser.Factory ruf, final SchemaFactory<ReviewDb> db, final GitRepositoryManager grm, GroupCache gc) throws ConfigInvalidException, IOException { injector = i; workQueue = wq; database = db; replicationUserFactory = ruf; gitRepositoryManager = grm; <MASK>configs = allConfigs(site);</MASK> groupCache = gc; }"
Inversion-Mutation
megadiff
"private Configuration getConfigInstance(String configPath, String fromPage) throws PhrescoException { boolean isIISServer = false; Properties properties = new Properties(); List<PropertyTemplate> propertyTemplates = new ArrayList<PropertyTemplate>(); if (CONFIG_FEATURES.equals(getConfigId()) || CONFIG_COMPONENTS.equals(getConfigId())) { setEnvName(getEnvironment().getName()); propertyTemplates = getPropTemplateFromConfigFile(); properties.setProperty(REQ_FEATURE_NAME, getActionContextParam(REQ_FEATURE_NAME)); } else if(!REQ_CONFIG_TYPE_OTHER.equals(getConfigType())) { SettingsTemplate configTemplate = getServiceManager().getConfigTemplate(getConfigId(), getCustomerId()); propertyTemplates = configTemplate.getProperties(); } if (CollectionUtils.isNotEmpty(propertyTemplates)) { for (PropertyTemplate propertyTemplate : propertyTemplates) { if (!TYPE_ACTIONS.equals(propertyTemplate.getType())) { String key = propertyTemplate.getKey(); String value = getActionContextParam(key); if (TYPE_FILE.equals(propertyTemplate.getType())) { if (StringUtils.isNotEmpty(getCsvFiles())) { Map<String, List<String>> fileNamesMap = new HashMap<String, List<String>>(); String[] csvSplits = getCsvFiles().split(Constants.STR_COMMA); for (String csvSplit : csvSplits) { String[] splits = csvSplit.split(SEPARATOR_SEP); String propName = splits[0]; String fileName = splits[1]; if (fileNamesMap.containsKey(propName)) { List<String> list = fileNamesMap.get(propName); list.add(fileName); fileNamesMap.put(propName, list); } else { fileNamesMap.put(propName, Collections.singletonList(fileName)); } } StringBuilder sb = new StringBuilder(); if (MapUtils.isNotEmpty(fileNamesMap)) { Set<String> keySet = fileNamesMap.keySet(); for (String mapKey : keySet) { List<String> fileNames = fileNamesMap.get(mapKey); for (String fileName : fileNames) { sb.append(mapKey) .append(File.separator) .append(fileName) .append(Constants.STR_COMMA); } } } key = FILES; value = sb.toString().substring(0, sb.toString().length() - 1); } } if (REMOTE_DEPLOYMENT.equals(key) && StringUtils.isEmpty(value)) { value = "false"; } if (StringUtils.isNotEmpty(key) && !KEY_CERTIFICATE.equals(key) && StringUtils.isNotEmpty(value)) { properties.setProperty(key, value); } else { value = getActionContextParam(key); if (StringUtils.isNotEmpty(value)) { File file = new File(value); if(fromPage.equals(CONFIGURATION)) { value = configCertificateSave(configPath, value, file); } else if (fromPage.equals(SETTINGS)){ value = settingsCertificateSave(configPath, file); } properties.setProperty(key, value); } } if (CONFIG_TYPE.equals(key) && IIS_SERVER.equals(value)) { isIISServer = true; } if (CONFIG_TYPE.equals(key)) { properties.setProperty(TYPE_VERSION, getVersion()); } } } } //To get the custom properties if (CollectionUtils.isNotEmpty(getKey()) && CollectionUtils.isNotEmpty(getValue())) { for (int i = 0; i < getKey().size(); i++) { if (StringUtils.isNotEmpty(getKey().get(i)) && StringUtils.isNotEmpty(getValue().get(i))) { properties.setProperty(getKey().get(i), getValue().get(i)); } } } ApplicationInfo applicationInfo = getApplicationInfo(); if (applicationInfo != null && applicationInfo.getTechInfo().getId().equals(FrameworkConstants.TECH_SITE_CORE) && SERVER.equals(getConfigType())) { properties.setProperty(SETTINGS_TEMP_SITECORE_INST_PATH, getSiteCoreInstPath()); } if (isIISServer) { properties.setProperty(SETTINGS_TEMP_KEY_APP_NAME, getAppName()); properties.setProperty(SETTINGS_TEMP_KEY_SITE_NAME, getSiteName()); } Configuration config = new Configuration(getConfigName(), getConfigType()); config.setDesc(getDescription()); config.setEnvName(getEnvironment().getName()); config.setProperties(properties); return config; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getConfigInstance"
"private Configuration getConfigInstance(String configPath, String fromPage) throws PhrescoException { boolean isIISServer = false; Properties properties = new Properties(); List<PropertyTemplate> propertyTemplates = new ArrayList<PropertyTemplate>(); if (CONFIG_FEATURES.equals(getConfigId()) || CONFIG_COMPONENTS.equals(getConfigId())) { setEnvName(getEnvironment().getName()); propertyTemplates = getPropTemplateFromConfigFile(); properties.setProperty(REQ_FEATURE_NAME, getActionContextParam(REQ_FEATURE_NAME)); <MASK>}</MASK> else if(!REQ_CONFIG_TYPE_OTHER.equals(getConfigType())) { SettingsTemplate configTemplate = getServiceManager().getConfigTemplate(getConfigId(), getCustomerId()); propertyTemplates = configTemplate.getProperties(); <MASK>}</MASK> if (CollectionUtils.isNotEmpty(propertyTemplates)) { for (PropertyTemplate propertyTemplate : propertyTemplates) { if (!TYPE_ACTIONS.equals(propertyTemplate.getType())) { String key = propertyTemplate.getKey(); String value = getActionContextParam(key); if (TYPE_FILE.equals(propertyTemplate.getType())) { if (StringUtils.isNotEmpty(getCsvFiles())) { Map<String, List<String>> fileNamesMap = new HashMap<String, List<String>>(); String[] csvSplits = getCsvFiles().split(Constants.STR_COMMA); for (String csvSplit : csvSplits) { String[] splits = csvSplit.split(SEPARATOR_SEP); String propName = splits[0]; String fileName = splits[1]; if (fileNamesMap.containsKey(propName)) { List<String> list = fileNamesMap.get(propName); list.add(fileName); fileNamesMap.put(propName, list); <MASK>}</MASK> else { fileNamesMap.put(propName, Collections.singletonList(fileName)); <MASK>}</MASK> <MASK>}</MASK> StringBuilder sb = new StringBuilder(); if (MapUtils.isNotEmpty(fileNamesMap)) { Set<String> keySet = fileNamesMap.keySet(); for (String mapKey : keySet) { List<String> fileNames = fileNamesMap.get(mapKey); for (String fileName : fileNames) { sb.append(mapKey) .append(File.separator) .append(fileName) .append(Constants.STR_COMMA); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> key = FILES; value = sb.toString().substring(0, sb.toString().length() - 1); <MASK>}</MASK> <MASK>}</MASK> if (REMOTE_DEPLOYMENT.equals(key) && StringUtils.isEmpty(value)) { value = "false"; <MASK>}</MASK> if (StringUtils.isNotEmpty(key) && !KEY_CERTIFICATE.equals(key) && StringUtils.isNotEmpty(value)) { properties.setProperty(key, value); <MASK>}</MASK> else { value = getActionContextParam(key); if (StringUtils.isNotEmpty(value)) { File file = new File(value); if(fromPage.equals(CONFIGURATION)) { value = configCertificateSave(configPath, value, file); <MASK>}</MASK> else if (fromPage.equals(SETTINGS)){ value = settingsCertificateSave(configPath, file); <MASK>}</MASK> properties.setProperty(key, value); <MASK>}</MASK> if (CONFIG_TYPE.equals(key) && IIS_SERVER.equals(value)) { isIISServer = true; <MASK>}</MASK> if (CONFIG_TYPE.equals(key)) { properties.setProperty(TYPE_VERSION, getVersion()); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> //To get the custom properties if (CollectionUtils.isNotEmpty(getKey()) && CollectionUtils.isNotEmpty(getValue())) { for (int i = 0; i < getKey().size(); i++) { if (StringUtils.isNotEmpty(getKey().get(i)) && StringUtils.isNotEmpty(getValue().get(i))) { properties.setProperty(getKey().get(i), getValue().get(i)); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> ApplicationInfo applicationInfo = getApplicationInfo(); if (applicationInfo != null && applicationInfo.getTechInfo().getId().equals(FrameworkConstants.TECH_SITE_CORE) && SERVER.equals(getConfigType())) { properties.setProperty(SETTINGS_TEMP_SITECORE_INST_PATH, getSiteCoreInstPath()); <MASK>}</MASK> if (isIISServer) { properties.setProperty(SETTINGS_TEMP_KEY_APP_NAME, getAppName()); properties.setProperty(SETTINGS_TEMP_KEY_SITE_NAME, getSiteName()); <MASK>}</MASK> Configuration config = new Configuration(getConfigName(), getConfigType()); config.setDesc(getDescription()); config.setEnvName(getEnvironment().getName()); config.setProperties(properties); return config; <MASK>}</MASK>"
Inversion-Mutation
megadiff
"public static List<TaggingPreset> readAll(Reader in) throws SAXException { XmlObjectParser parser = new XmlObjectParser(); parser.mapOnStart("item", TaggingPreset.class); parser.mapOnStart("separator", TaggingPresetSeparator.class); parser.mapBoth("group", TaggingPresetMenu.class); parser.map("text", Text.class); parser.map("link", Link.class); parser.mapOnStart("optional", Optional.class); parser.map("check", Check.class); parser.map("combo", Combo.class); parser.map("label", Label.class); parser.map("space", Space.class); parser.map("key", Key.class); LinkedList<TaggingPreset> all = new LinkedList<TaggingPreset>(); TaggingPresetMenu lastmenu = null; parser.start(in); while(parser.hasNext()) { Object o = parser.next(); if (o instanceof TaggingPresetMenu) { TaggingPresetMenu tp = (TaggingPresetMenu) o; if(tp == lastmenu) { lastmenu = tp.group; } else { tp.group = lastmenu; tp.setDisplayName(); lastmenu = tp; all.add(tp); Main.toolbar.register(tp); } } else if (o instanceof TaggingPresetSeparator) { TaggingPresetSeparator tp = (TaggingPresetSeparator) o; tp.group = lastmenu; all.add(tp); } else if (o instanceof TaggingPreset) { TaggingPreset tp = (TaggingPreset) o; tp.group = lastmenu; tp.setDisplayName(); all.add(tp); Main.toolbar.register(tp); } else { all.getLast().data.add((Item)o); } } return all; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "readAll"
"public static List<TaggingPreset> readAll(Reader in) throws SAXException { XmlObjectParser parser = new XmlObjectParser(); parser.mapOnStart("item", TaggingPreset.class); parser.mapOnStart("separator", TaggingPresetSeparator.class); parser.mapBoth("group", TaggingPresetMenu.class); parser.map("text", Text.class); parser.map("link", Link.class); parser.mapOnStart("optional", Optional.class); parser.map("check", Check.class); parser.map("combo", Combo.class); parser.map("label", Label.class); parser.map("space", Space.class); parser.map("key", Key.class); LinkedList<TaggingPreset> all = new LinkedList<TaggingPreset>(); TaggingPresetMenu lastmenu = null; parser.start(in); while(parser.hasNext()) { Object o = parser.next(); if (o instanceof TaggingPresetMenu) { TaggingPresetMenu tp = (TaggingPresetMenu) o; if(tp == lastmenu) { lastmenu = tp.group; } else { <MASK>tp.setDisplayName();</MASK> tp.group = lastmenu; lastmenu = tp; all.add(tp); Main.toolbar.register(tp); } } else if (o instanceof TaggingPresetSeparator) { TaggingPresetSeparator tp = (TaggingPresetSeparator) o; tp.group = lastmenu; all.add(tp); } else if (o instanceof TaggingPreset) { TaggingPreset tp = (TaggingPreset) o; tp.group = lastmenu; <MASK>tp.setDisplayName();</MASK> all.add(tp); Main.toolbar.register(tp); } else { all.getLast().data.add((Item)o); } } return all; }"
Inversion-Mutation
megadiff
"@Override public boolean onCommand(CommandSender commandSender, Command command, String commandLabel, String[] args) { boolean success = false; String cmd = command.getName().toLowerCase(); if (commandSender instanceof Player) { UhcPlayer pl = match.getPlayer((Player) commandSender); if (pl.isAdmin()) { success = runCommandAsAdmin(pl, cmd, args) || runCommandAsSpectator(pl.getSpectator(), cmd, args) || runCommandAsConsole(commandSender, cmd, args) || runCommandAsPlayer(pl, cmd, args); } else if (pl.isSpectator()) { success = runCommandAsSpectator(pl.getSpectator(), cmd, args) || runCommandAsPlayer(pl, cmd, args); } else { success = runCommandAsPlayer(pl, cmd, args); } } else if (commandSender instanceof ConsoleCommandSender) { success = runCommandAsConsole(commandSender, cmd, args); } return success; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCommand"
"@Override public boolean onCommand(CommandSender commandSender, Command command, String commandLabel, String[] args) { boolean success = false; String cmd = command.getName().toLowerCase(); if (commandSender instanceof Player) { UhcPlayer pl = match.getPlayer((Player) commandSender); if (pl.isAdmin()) { success = runCommandAsAdmin(pl, cmd, args) <MASK>|| runCommandAsConsole(commandSender, cmd, args)</MASK> || runCommandAsSpectator(pl.getSpectator(), cmd, args) || runCommandAsPlayer(pl, cmd, args); } else if (pl.isSpectator()) { success = runCommandAsSpectator(pl.getSpectator(), cmd, args) || runCommandAsPlayer(pl, cmd, args); } else { success = runCommandAsPlayer(pl, cmd, args); } } else if (commandSender instanceof ConsoleCommandSender) { success = runCommandAsConsole(commandSender, cmd, args); } return success; }"
Inversion-Mutation
megadiff
"void addCloneServicePanel(final ServiceInfo newServiceInfo) { containedService = newServiceInfo; newServiceInfo.getService().setResourceClass( newServiceInfo.getResourceAgent().getResourceClass()); newServiceInfo.setCloneInfo(this); getBrowser().addToHeartbeatIdList(newServiceInfo); getBrowser().addNameToServiceInfoHash(newServiceInfo); final DefaultMutableTreeNode newServiceNode = new DefaultMutableTreeNode(newServiceInfo); newServiceInfo.setNode(newServiceNode); SwingUtilities.invokeLater(new Runnable() { public void run() { final DefaultMutableTreeNode node = getNode(); if (node != null) { getBrowser().reloadAndWait(node, false); node.add(newServiceNode); } getBrowser().reloadAndWait(newServiceNode, true); } }); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addCloneServicePanel"
"void addCloneServicePanel(final ServiceInfo newServiceInfo) { containedService = newServiceInfo; newServiceInfo.getService().setResourceClass( newServiceInfo.getResourceAgent().getResourceClass()); newServiceInfo.setCloneInfo(this); getBrowser().addToHeartbeatIdList(newServiceInfo); getBrowser().addNameToServiceInfoHash(newServiceInfo); final DefaultMutableTreeNode newServiceNode = new DefaultMutableTreeNode(newServiceInfo); SwingUtilities.invokeLater(new Runnable() { public void run() { <MASK>newServiceInfo.setNode(newServiceNode);</MASK> final DefaultMutableTreeNode node = getNode(); if (node != null) { getBrowser().reloadAndWait(node, false); node.add(newServiceNode); } getBrowser().reloadAndWait(newServiceNode, true); } }); }"
Inversion-Mutation
megadiff
"@Override public void onListItemClick(ListView l, View v, int position, long id) { DetailFragment fragment = (DetailFragment)getFragmentManager().findFragmentById(R.id.detail_fragment); if (fragment != null && fragment.isInLayout()) { v.setActivated(true); fragment.displayEvent((Event)l.getItemAtPosition(position)); } else { Intent intent = new Intent(getActivity(), DetailActivity.class); intent.putExtra("event", ((Event)l.getItemAtPosition(position))); startActivity(intent); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onListItemClick"
"@Override public void onListItemClick(ListView l, View v, int position, long id) { <MASK>v.setActivated(true);</MASK> DetailFragment fragment = (DetailFragment)getFragmentManager().findFragmentById(R.id.detail_fragment); if (fragment != null && fragment.isInLayout()) { fragment.displayEvent((Event)l.getItemAtPosition(position)); } else { Intent intent = new Intent(getActivity(), DetailActivity.class); intent.putExtra("event", ((Event)l.getItemAtPosition(position))); startActivity(intent); } }"
Inversion-Mutation
megadiff
"public void deleteData() throws SQLException, IOException { update("delete from budget_line_items"); update("delete from budget_file_info"); update("delete from role_rights where roleId not in(1)"); update("delete from role_assignments where userId not in (1)"); update("delete from fulfillment_role_assignments"); update("delete from roles where name not in ('Admin')"); update("delete from facility_approved_products"); update("delete from program_product_price_history"); update("delete from pod_line_items"); update("delete from pod"); update("delete from orders"); update("delete from requisition_status_changes"); update("delete from user_password_reset_tokens"); update("delete from comments"); update("delete from epi_use_line_items"); update("delete from epi_inventory_line_items"); update("delete from facility_visits"); update("delete from refrigerator_problems"); update("delete from refrigerator_readings"); update("delete from full_coverages"); update("delete from distributions"); update("delete from refrigerators"); update("delete from users where userName not like('Admin%')"); deleteRnrData(); update("delete from program_product_isa"); update("delete from facility_approved_products"); update("delete from facility_program_products"); update("delete from program_products"); update("delete from products"); update("delete from product_categories"); update("delete from product_groups"); update("delete from supply_lines"); update("delete from programs_supported"); update("delete from requisition_group_members"); update("delete from program_rnr_columns"); update("delete from requisition_group_program_schedules"); update("delete from requisition_groups"); update("delete from requisition_group_members"); update("delete from delivery_zone_program_schedules"); update("delete from delivery_zone_warehouses"); update("delete from delivery_zone_members"); update("delete from role_assignments where deliveryZoneId in (select id from delivery_zones where code in('DZ1','DZ2'))"); update("delete from delivery_zones"); update("delete from supervisory_nodes"); update("delete from refrigerators"); update("delete from facility_ftp_details"); update("delete from refrigerators"); update("delete from facilities"); update("delete from geographic_zones where code not in ('Root','Arusha','Dodoma', 'Ngorongoro')"); update("delete from processing_periods"); update("delete from processing_schedules"); update("delete from atomfeed.event_records"); update("delete from regimens"); update("delete from program_regimen_columns"); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "deleteData"
"public void deleteData() throws SQLException, IOException { update("delete from budget_line_items"); update("delete from budget_file_info"); update("delete from role_rights where roleId not in(1)"); update("delete from role_assignments where userId not in (1)"); update("delete from fulfillment_role_assignments"); update("delete from roles where name not in ('Admin')"); update("delete from facility_approved_products"); update("delete from program_product_price_history"); update("delete from pod_line_items"); update("delete from pod"); update("delete from orders"); update("delete from requisition_status_changes"); update("delete from user_password_reset_tokens"); update("delete from comments"); <MASK>update("delete from facility_visits");</MASK> update("delete from epi_use_line_items"); update("delete from epi_inventory_line_items"); update("delete from refrigerator_problems"); update("delete from refrigerator_readings"); update("delete from full_coverages"); update("delete from distributions"); update("delete from refrigerators"); update("delete from users where userName not like('Admin%')"); deleteRnrData(); update("delete from program_product_isa"); update("delete from facility_approved_products"); update("delete from facility_program_products"); update("delete from program_products"); update("delete from products"); update("delete from product_categories"); update("delete from product_groups"); update("delete from supply_lines"); update("delete from programs_supported"); update("delete from requisition_group_members"); update("delete from program_rnr_columns"); update("delete from requisition_group_program_schedules"); update("delete from requisition_groups"); update("delete from requisition_group_members"); update("delete from delivery_zone_program_schedules"); update("delete from delivery_zone_warehouses"); update("delete from delivery_zone_members"); update("delete from role_assignments where deliveryZoneId in (select id from delivery_zones where code in('DZ1','DZ2'))"); update("delete from delivery_zones"); update("delete from supervisory_nodes"); update("delete from refrigerators"); update("delete from facility_ftp_details"); update("delete from refrigerators"); update("delete from facilities"); update("delete from geographic_zones where code not in ('Root','Arusha','Dodoma', 'Ngorongoro')"); update("delete from processing_periods"); update("delete from processing_schedules"); update("delete from atomfeed.event_records"); update("delete from regimens"); update("delete from program_regimen_columns"); }"
Inversion-Mutation
megadiff
"public void setSpectator(final Gamer gamer) { gamer.setAlive(false); gamer.getPlayer().getInventory().remove(HungergamesApi.getInventoryManager().getKitSelector()); ItemStack compass = new ItemStack(Material.COMPASS); compass.addEnchantment(EnchantmentManager.UNDROPPABLE, 1); EnchantmentManager.updateEnchants(compass); if (!gamer.getPlayer().getInventory().contains(compass)) gamer.getPlayer().getInventory().addItem(compass); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setSpectator"
"public void setSpectator(final Gamer gamer) { gamer.setAlive(false); ItemStack compass = new ItemStack(Material.COMPASS); compass.addEnchantment(EnchantmentManager.UNDROPPABLE, 1); EnchantmentManager.updateEnchants(compass); if (!gamer.getPlayer().getInventory().contains(compass)) gamer.getPlayer().getInventory().addItem(compass); <MASK>gamer.getPlayer().getInventory().remove(HungergamesApi.getInventoryManager().getKitSelector());</MASK> }"
Inversion-Mutation
megadiff
"private void initResources() throws FIXFieldConverterNotAvailable { MessageBundleManager.registerCoreMessageBundle(); MessageBundleManager.registerMessageBundle("photon", "photon_fix_messages"); FIXDataDictionaryManager.setFIXVersion(FIXDataDictionaryManager.FIX_4_2_BEGIN_STRING); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initResources"
"private void initResources() throws FIXFieldConverterNotAvailable { <MASK>FIXDataDictionaryManager.setFIXVersion(FIXDataDictionaryManager.FIX_4_2_BEGIN_STRING);</MASK> MessageBundleManager.registerCoreMessageBundle(); MessageBundleManager.registerMessageBundle("photon", "photon_fix_messages"); }"
Inversion-Mutation
megadiff
"public TileSet(TiledMap map, Element element, boolean loadImage) throws SlickException { this.map = map; firstGID = Integer.parseInt(element.getAttribute("firstgid")); String source = element.getAttribute("source"); if ((source != null) && (!source.equals(""))) { try { InputStream in = ResourceLoader.getResourceAsStream(map.getTilesLocation() + "/" + source); DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.parse(in); Element docElement = doc.getDocumentElement(); element = docElement; //(Element) docElement.getElementsByTagName("tileset").item(0); name = element.getAttribute("name"); } catch (Exception e) { Log.error(e); throw new SlickException("Unable to load or parse sourced tileset: "+this.map.tilesLocation+"/"+source); } } String tileWidthString = element.getAttribute("tilewidth"); String tileHeightString = element.getAttribute("tileheight"); if(tileWidthString.length() == 0 || tileHeightString.length() == 0) { throw new SlickException("TiledMap requires that the map be created with tilesets that use a " + "single image. Check the WiKi for more complete information."); } tileWidth = Integer.parseInt(tileWidthString); tileHeight = Integer.parseInt(tileHeightString); String sv = element.getAttribute("spacing"); if ((sv != null) && (!sv.equals(""))) { tileSpacing = Integer.parseInt(sv); } String mv = element.getAttribute("margin"); if ((mv != null) && (!mv.equals(""))) { tileMargin = Integer.parseInt(mv); } NodeList list = element.getElementsByTagName("image"); Element imageNode = (Element) list.item(0); String ref = imageNode.getAttribute("source"); Color trans = null; String t = imageNode.getAttribute("trans"); if ((t != null) && (t.length() > 0)) { int c = Integer.parseInt(t, 16); trans = new Color(c); } if (loadImage) { Image image = new Image(map.getTilesLocation()+"/"+ref,false,Image.FILTER_NEAREST,trans); setTileSetImage(image); } NodeList pElements = element.getElementsByTagName("tile"); for (int i=0;i<pElements.getLength();i++) { Element tileElement = (Element) pElements.item(i); int id = Integer.parseInt(tileElement.getAttribute("id")); id += firstGID; Properties tileProps = new Properties(); Element propsElement = (Element) tileElement.getElementsByTagName("properties").item(0); NodeList properties = propsElement.getElementsByTagName("property"); for (int p=0;p<properties.getLength();p++) { Element propElement = (Element) properties.item(p); String name = propElement.getAttribute("name"); String value = propElement.getAttribute("value"); tileProps.setProperty(name, value); } props.put(new Integer(id), tileProps); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "TileSet"
"public TileSet(TiledMap map, Element element, boolean loadImage) throws SlickException { this.map = map; <MASK>name = element.getAttribute("name");</MASK> firstGID = Integer.parseInt(element.getAttribute("firstgid")); String source = element.getAttribute("source"); if ((source != null) && (!source.equals(""))) { try { InputStream in = ResourceLoader.getResourceAsStream(map.getTilesLocation() + "/" + source); DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.parse(in); Element docElement = doc.getDocumentElement(); element = docElement; //(Element) docElement.getElementsByTagName("tileset").item(0); } catch (Exception e) { Log.error(e); throw new SlickException("Unable to load or parse sourced tileset: "+this.map.tilesLocation+"/"+source); } } String tileWidthString = element.getAttribute("tilewidth"); String tileHeightString = element.getAttribute("tileheight"); if(tileWidthString.length() == 0 || tileHeightString.length() == 0) { throw new SlickException("TiledMap requires that the map be created with tilesets that use a " + "single image. Check the WiKi for more complete information."); } tileWidth = Integer.parseInt(tileWidthString); tileHeight = Integer.parseInt(tileHeightString); String sv = element.getAttribute("spacing"); if ((sv != null) && (!sv.equals(""))) { tileSpacing = Integer.parseInt(sv); } String mv = element.getAttribute("margin"); if ((mv != null) && (!mv.equals(""))) { tileMargin = Integer.parseInt(mv); } NodeList list = element.getElementsByTagName("image"); Element imageNode = (Element) list.item(0); String ref = imageNode.getAttribute("source"); Color trans = null; String t = imageNode.getAttribute("trans"); if ((t != null) && (t.length() > 0)) { int c = Integer.parseInt(t, 16); trans = new Color(c); } if (loadImage) { Image image = new Image(map.getTilesLocation()+"/"+ref,false,Image.FILTER_NEAREST,trans); setTileSetImage(image); } NodeList pElements = element.getElementsByTagName("tile"); for (int i=0;i<pElements.getLength();i++) { Element tileElement = (Element) pElements.item(i); int id = Integer.parseInt(tileElement.getAttribute("id")); id += firstGID; Properties tileProps = new Properties(); Element propsElement = (Element) tileElement.getElementsByTagName("properties").item(0); NodeList properties = propsElement.getElementsByTagName("property"); for (int p=0;p<properties.getLength();p++) { Element propElement = (Element) properties.item(p); String name = propElement.getAttribute("name"); String value = propElement.getAttribute("value"); tileProps.setProperty(name, value); } props.put(new Integer(id), tileProps); } }"
Inversion-Mutation
megadiff
"@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.survey); preferences = getSharedPreferences(getString(R.string.preferences), Activity.MODE_PRIVATE); // allow users to collect data even if they are not yet authenticated // let the survey_upload service make sure they are auth'd before // uploading... (lets users collect data without internet conn) //if (!preferences.getBoolean("authenticated", false)) { // Log.d(TAG, "exiting (not authenticated)"); // survey.this.finish(); // return; //} LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); if (!lm.isProviderEnabled(LocationManager.GPS_PROVIDER)) { Log.d(TAG, "no gps was enabled, so enabling the gps now"); alert_no_gps(); } ll = new light_loc (this, lm); sdb = new survey_db(this); Log.d(TAG, "gps listener and db are started"); // add taste boxes ArrayList<CheckBox> lcb = new ArrayList<CheckBox>(); lcb.add( (CheckBox) findViewById(R.id.taste_same) ); lcb.add( (CheckBox) findViewById(R.id.taste_good) ); lcb.add( (CheckBox) findViewById(R.id.taste_bad) ); lcb.add( (CheckBox) findViewById(R.id.taste_other) ); group_box_list.add(lcb); Log.d(TAG, "added taste boxes"); // add visibility boxes lcb = new ArrayList<CheckBox>(); lcb.add( (CheckBox) findViewById(R.id.visibility_visible) ); lcb.add( (CheckBox) findViewById(R.id.visibility_hidden) ); group_box_list.add(lcb); Log.d(TAG, "added visibility boxes"); // add operable boxes lcb = new ArrayList<CheckBox>(); lcb.add( (CheckBox) findViewById(R.id.operable_functioning) ); lcb.add( (CheckBox) findViewById(R.id.operable_broken) ); lcb.add( (CheckBox) findViewById(R.id.operable_needs_repair) ); group_box_list.add(lcb); Log.d(TAG, "added operable boxes"); // add flow boxes lcb = new ArrayList<CheckBox>(); lcb.add( (CheckBox) findViewById(R.id.flow_strong) ); lcb.add( (CheckBox) findViewById(R.id.flow_trickle) ); lcb.add( (CheckBox) findViewById(R.id.flow_too_strong) ); group_box_list.add(lcb); Log.d(TAG, "added flow boxes"); // add style boxes lcb = new ArrayList<CheckBox>(); lcb.add( (CheckBox) findViewById(R.id.style_refilling) ); lcb.add( (CheckBox) findViewById(R.id.style_drinking) ); lcb.add( (CheckBox) findViewById(R.id.style_both) ); group_box_list.add(lcb); Log.d(TAG, "added style boxes"); // add location boxes lcb = new ArrayList<CheckBox>(); lcb.add( (CheckBox) findViewById(R.id.location_indoor) ); lcb.add( (CheckBox) findViewById(R.id.location_outdoors) ); group_box_list.add(lcb); Log.d(TAG, "added location boxes"); // add submit button submit_button = (Button) findViewById(R.id.upload_button); // add picture button take_picture = (Button) findViewById(R.id.picture_button); // add clear history button //clear_history = (Button) findViewById(R.id.clear_history_button); Log.d(TAG, "added buttons"); // add image thumbnail view image_thumbnail = (ImageView) findViewById(R.id.thumbnail); // add check box listeners for (int j = 0; j < group_box_list.size(); j++) { lcb = group_box_list.get(j); for (int i = 0; i < lcb.size(); i++) { CheckBox cb = (CheckBox) lcb.get(i); cb.setOnClickListener(check_box_listener); } } // add submit button listener submit_button.setOnClickListener(submit_button_listener); // add take picture button listener take_picture.setOnClickListener(take_picture_listener); // add clear history button listener //clear_history.setOnClickListener(clear_history_listener); // restore previous state (if available) if (savedInstanceState != null && savedInstanceState.getBoolean("started")) { for (int i = 0; i < group_box_list.size(); i++) { lcb = group_box_list.get(i); int k = savedInstanceState.getInt(Integer.toString(i)); for (int j = 0; j < lcb.size(); j++) { CheckBox cb = (CheckBox) lcb.get(j); if (j == k) { cb.setChecked(true); } else { cb.setChecked(false); } } } filename = savedInstanceState.getString("filename"); if ((null != filename) && (filename.toString() != "")) { Bitmap bm = BitmapFactory.decodeFile(filename); if (bm != null) { image_thumbnail.setImageBitmap(bm); } } } return; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate"
"@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.survey); preferences = getSharedPreferences(getString(R.string.preferences), Activity.MODE_PRIVATE); // allow users to collect data even if they are not yet authenticated // let the survey_upload service make sure they are auth'd before // uploading... (lets users collect data without internet conn) //if (!preferences.getBoolean("authenticated", false)) { // Log.d(TAG, "exiting (not authenticated)"); // survey.this.finish(); // return; //} LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); if (!lm.isProviderEnabled(LocationManager.GPS_PROVIDER)) { Log.d(TAG, "no gps was enabled, so enabling the gps now"); alert_no_gps(); } ll = new light_loc (this, lm); sdb = new survey_db(this); Log.d(TAG, "gps listener and db are started"); // add taste boxes ArrayList<CheckBox> lcb = new ArrayList<CheckBox>(); lcb.add( (CheckBox) findViewById(R.id.taste_same) ); lcb.add( (CheckBox) findViewById(R.id.taste_good) ); lcb.add( (CheckBox) findViewById(R.id.taste_bad) ); lcb.add( (CheckBox) findViewById(R.id.taste_other) ); group_box_list.add(lcb); Log.d(TAG, "added taste boxes"); // add visibility boxes lcb = new ArrayList<CheckBox>(); lcb.add( (CheckBox) findViewById(R.id.visibility_visible) ); lcb.add( (CheckBox) findViewById(R.id.visibility_hidden) ); group_box_list.add(lcb); Log.d(TAG, "added visibility boxes"); // add operable boxes lcb = new ArrayList<CheckBox>(); lcb.add( (CheckBox) findViewById(R.id.operable_functioning) ); <MASK>lcb.add( (CheckBox) findViewById(R.id.operable_needs_repair) );</MASK> lcb.add( (CheckBox) findViewById(R.id.operable_broken) ); group_box_list.add(lcb); Log.d(TAG, "added operable boxes"); // add flow boxes lcb = new ArrayList<CheckBox>(); lcb.add( (CheckBox) findViewById(R.id.flow_strong) ); lcb.add( (CheckBox) findViewById(R.id.flow_trickle) ); lcb.add( (CheckBox) findViewById(R.id.flow_too_strong) ); group_box_list.add(lcb); Log.d(TAG, "added flow boxes"); // add style boxes lcb = new ArrayList<CheckBox>(); lcb.add( (CheckBox) findViewById(R.id.style_refilling) ); lcb.add( (CheckBox) findViewById(R.id.style_drinking) ); lcb.add( (CheckBox) findViewById(R.id.style_both) ); group_box_list.add(lcb); Log.d(TAG, "added style boxes"); // add location boxes lcb = new ArrayList<CheckBox>(); lcb.add( (CheckBox) findViewById(R.id.location_indoor) ); lcb.add( (CheckBox) findViewById(R.id.location_outdoors) ); group_box_list.add(lcb); Log.d(TAG, "added location boxes"); // add submit button submit_button = (Button) findViewById(R.id.upload_button); // add picture button take_picture = (Button) findViewById(R.id.picture_button); // add clear history button //clear_history = (Button) findViewById(R.id.clear_history_button); Log.d(TAG, "added buttons"); // add image thumbnail view image_thumbnail = (ImageView) findViewById(R.id.thumbnail); // add check box listeners for (int j = 0; j < group_box_list.size(); j++) { lcb = group_box_list.get(j); for (int i = 0; i < lcb.size(); i++) { CheckBox cb = (CheckBox) lcb.get(i); cb.setOnClickListener(check_box_listener); } } // add submit button listener submit_button.setOnClickListener(submit_button_listener); // add take picture button listener take_picture.setOnClickListener(take_picture_listener); // add clear history button listener //clear_history.setOnClickListener(clear_history_listener); // restore previous state (if available) if (savedInstanceState != null && savedInstanceState.getBoolean("started")) { for (int i = 0; i < group_box_list.size(); i++) { lcb = group_box_list.get(i); int k = savedInstanceState.getInt(Integer.toString(i)); for (int j = 0; j < lcb.size(); j++) { CheckBox cb = (CheckBox) lcb.get(j); if (j == k) { cb.setChecked(true); } else { cb.setChecked(false); } } } filename = savedInstanceState.getString("filename"); if ((null != filename) && (filename.toString() != "")) { Bitmap bm = BitmapFactory.decodeFile(filename); if (bm != null) { image_thumbnail.setImageBitmap(bm); } } } return; }"
Inversion-Mutation
megadiff
"public void actionPerformed(ActionEvent e) { // Calls the tick; if( this.game != null && !is_over ){ this.game.tick(); is_over = this.game.isOver(); } // Repaint The game , this will actually call the paint function since it makes a request to repaint this.repaint(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "actionPerformed"
"public void actionPerformed(ActionEvent e) { // Calls the tick; if( this.game != null && !is_over ){ this.game.tick(); } <MASK>is_over = this.game.isOver();</MASK> // Repaint The game , this will actually call the paint function since it makes a request to repaint this.repaint(); }"
Inversion-Mutation
megadiff
"@Override protected void setSelectedIndex(int index, boolean incremental) { if (((JComboBox) _component).getSelectedIndex() != index) { ((JComboBox) _component).setSelectedIndex(index); } if (isShowPopupDuringSearching()) { ((JComboBox) _component).hidePopup(); try { if (!((JComboBox) _component).isPopupVisible() && KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner() != null && SwingUtilities.isDescendingFrom(KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(), _component)) { ((JComboBox) _component).showPopup(); } } catch (IllegalComponentStateException e) { //null } } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setSelectedIndex"
"@Override protected void setSelectedIndex(int index, boolean incremental) { if (((JComboBox) _component).getSelectedIndex() != index) { ((JComboBox) _component).setSelectedIndex(index); } <MASK>((JComboBox) _component).hidePopup();</MASK> if (isShowPopupDuringSearching()) { try { if (!((JComboBox) _component).isPopupVisible() && KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner() != null && SwingUtilities.isDescendingFrom(KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(), _component)) { ((JComboBox) _component).showPopup(); } } catch (IllegalComponentStateException e) { //null } } }"
Inversion-Mutation
megadiff
"@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.largepic); mSlideshow = (SlideShow) findViewById(R.id.slideshow); mSlideShowMode = getIntent().getBooleanExtra("slideshow", false); if (mSlideShowMode) { mSlideshow.setVisibility(View.VISIBLE); mSlideshow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); } else { mSlideshow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mSlideshow.setVisibility(View.GONE); } }); } mPager = (LargePicGallery) findViewById(R.id.photo_flow); mPager.setOffscreenPageLimit(1); mPager.setPageMargin(20); mPager.setHorizontalFadingEdgeEnabled(true); mPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() { @Override public void onPageSelected(int position) { mFooter.setText(mAdapter.getName(position)); } }); mFlowBar = (LinearLayout) findViewById(R.id.flow_bar); mFooter = (TextView) findViewById(R.id.footer_bar); Intent i = new Intent(); i.setClass(this, Downloader.class); this.bindService(i, mServiceConnection, BIND_AUTO_CREATE); mInodeDes = getIntent().getStringExtra("inode"); if (!mSlideShowMode) { mCurrentIndex = getIntent().getIntExtra("index", 0); } else { mCurrentIndex = 0; } mHanler.postDelayed(mToggleRunnable, 5000); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate"
"@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.largepic); mSlideshow = (SlideShow) findViewById(R.id.slideshow); mSlideShowMode = getIntent().getBooleanExtra("slideshow", false); if (mSlideShowMode) { mSlideshow.setVisibility(View.VISIBLE); mSlideshow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); } else { mSlideshow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mSlideshow.setVisibility(View.GONE); } }); } mPager = (LargePicGallery) findViewById(R.id.photo_flow); mPager.setOffscreenPageLimit(1); mPager.setPageMargin(20); mPager.setHorizontalFadingEdgeEnabled(true); mPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() { @Override public void onPageSelected(int position) { mFooter.setText(mAdapter.getName(position)); } }); mFlowBar = (LinearLayout) findViewById(R.id.flow_bar); mFooter = (TextView) findViewById(R.id.footer_bar); Intent i = new Intent(); i.setClass(this, Downloader.class); this.bindService(i, mServiceConnection, BIND_AUTO_CREATE); if (!mSlideShowMode) { mCurrentIndex = getIntent().getIntExtra("index", 0); <MASK>mInodeDes = getIntent().getStringExtra("inode");</MASK> } else { mCurrentIndex = 0; } mHanler.postDelayed(mToggleRunnable, 5000); }"
Inversion-Mutation
megadiff
"public WorldMapPane(WorldMapPaneDataModel dataModel, LayerCanvas.Overlay overlay) { this.dataModel = dataModel; layerCanvas = new LayerCanvas(); this.panSupport = new DefaultPanSupport(layerCanvas); getLayerCanvas().getModel().getViewport().setModelYAxisDown(false); if (overlay == null) { getLayerCanvas().addOverlay(new BoundaryOverlayImpl(dataModel)); } else { getLayerCanvas().addOverlay(overlay); } final Layer rootLayer = getLayerCanvas().getLayer(); final Dimension dimension = new Dimension(400, 200); final Viewport viewport = getLayerCanvas().getViewport(); viewport.setViewBounds(new Rectangle(dimension)); setPreferredSize(dimension); setSize(dimension); setLayout(new BorderLayout()); add(getLayerCanvas(), BorderLayout.CENTER); dataModel.addModelChangeListener(new ModelChangeListener()); worldMapLayer = dataModel.getWorldMapLayer(new WorldMapLayerContext(rootLayer)); installLayerCanvasNavigation(getLayerCanvas(), worldMapLayer); getLayerCanvas().getLayer().getChildren().add(worldMapLayer); getLayerCanvas().getViewport().zoom(worldMapLayer.getModelBounds()); setNavControlVisible(true); addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { AffineTransform transform = getLayerCanvas().getViewport().getModelToViewTransform(); double minX = getLayerCanvas().getMaxVisibleModelBounds().getMinX(); double minY = getLayerCanvas().getMaxVisibleModelBounds().getMinY(); double maxX = getLayerCanvas().getMaxVisibleModelBounds().getMaxX(); double maxY = getLayerCanvas().getMaxVisibleModelBounds().getMaxY(); final Point2D upperLeft = transform.transform(new Point2D.Double(minX, minY), null); final Point2D lowerRight = transform.transform(new Point2D.Double(maxX, maxY), null); /* * We need to give the borders a minimum width/height of 1 because otherwise the intersection * operation would not work */ Rectangle2D northBorder = new Rectangle2D.Double(upperLeft.getX(), upperLeft.getY(), lowerRight.getX() - upperLeft.getX(), 1); Rectangle2D southBorder = new Rectangle2D.Double(upperLeft.getX(), lowerRight.getY(), lowerRight.getX() - upperLeft.getX(), 1); Rectangle2D westBorder = new Rectangle2D.Double(upperLeft.getX(), lowerRight.getY(), 1, upperLeft.getY() - lowerRight.getY()); Rectangle2D eastBorder = new Rectangle2D.Double(lowerRight.getX(), lowerRight.getY(), 1, upperLeft.getY() - lowerRight.getY()); boolean isWorldMapFullyVisible = getLayerCanvas().getBounds().intersects(northBorder) || getLayerCanvas().getBounds().intersects(southBorder) || getLayerCanvas().getBounds().intersects(westBorder) || getLayerCanvas().getBounds().intersects(eastBorder); if (isWorldMapFullyVisible) { getLayerCanvas().getViewport().zoom(worldMapLayer.getModelBounds()); } } }); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "WorldMapPane"
"public WorldMapPane(WorldMapPaneDataModel dataModel, LayerCanvas.Overlay overlay) { this.dataModel = dataModel; <MASK>this.panSupport = new DefaultPanSupport(layerCanvas);</MASK> layerCanvas = new LayerCanvas(); getLayerCanvas().getModel().getViewport().setModelYAxisDown(false); if (overlay == null) { getLayerCanvas().addOverlay(new BoundaryOverlayImpl(dataModel)); } else { getLayerCanvas().addOverlay(overlay); } final Layer rootLayer = getLayerCanvas().getLayer(); final Dimension dimension = new Dimension(400, 200); final Viewport viewport = getLayerCanvas().getViewport(); viewport.setViewBounds(new Rectangle(dimension)); setPreferredSize(dimension); setSize(dimension); setLayout(new BorderLayout()); add(getLayerCanvas(), BorderLayout.CENTER); dataModel.addModelChangeListener(new ModelChangeListener()); worldMapLayer = dataModel.getWorldMapLayer(new WorldMapLayerContext(rootLayer)); installLayerCanvasNavigation(getLayerCanvas(), worldMapLayer); getLayerCanvas().getLayer().getChildren().add(worldMapLayer); getLayerCanvas().getViewport().zoom(worldMapLayer.getModelBounds()); setNavControlVisible(true); addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { AffineTransform transform = getLayerCanvas().getViewport().getModelToViewTransform(); double minX = getLayerCanvas().getMaxVisibleModelBounds().getMinX(); double minY = getLayerCanvas().getMaxVisibleModelBounds().getMinY(); double maxX = getLayerCanvas().getMaxVisibleModelBounds().getMaxX(); double maxY = getLayerCanvas().getMaxVisibleModelBounds().getMaxY(); final Point2D upperLeft = transform.transform(new Point2D.Double(minX, minY), null); final Point2D lowerRight = transform.transform(new Point2D.Double(maxX, maxY), null); /* * We need to give the borders a minimum width/height of 1 because otherwise the intersection * operation would not work */ Rectangle2D northBorder = new Rectangle2D.Double(upperLeft.getX(), upperLeft.getY(), lowerRight.getX() - upperLeft.getX(), 1); Rectangle2D southBorder = new Rectangle2D.Double(upperLeft.getX(), lowerRight.getY(), lowerRight.getX() - upperLeft.getX(), 1); Rectangle2D westBorder = new Rectangle2D.Double(upperLeft.getX(), lowerRight.getY(), 1, upperLeft.getY() - lowerRight.getY()); Rectangle2D eastBorder = new Rectangle2D.Double(lowerRight.getX(), lowerRight.getY(), 1, upperLeft.getY() - lowerRight.getY()); boolean isWorldMapFullyVisible = getLayerCanvas().getBounds().intersects(northBorder) || getLayerCanvas().getBounds().intersects(southBorder) || getLayerCanvas().getBounds().intersects(westBorder) || getLayerCanvas().getBounds().intersects(eastBorder); if (isWorldMapFullyVisible) { getLayerCanvas().getViewport().zoom(worldMapLayer.getModelBounds()); } } }); }"
Inversion-Mutation
megadiff
"@Override protected Boolean doInBackgroundInternal(Geocache[] caches) { final StringBuilder fieldNoteBuffer = new StringBuilder(); try { int i = 0; for (final Geocache cache : caches) { if (cache.isLogOffline()) { final LogEntry log = cgData.loadLogOffline(cache.getGeocode()); if (!onlyNew || onlyNew && log.date > Settings.getFieldnoteExportDate()) { appendFieldNote(fieldNoteBuffer, cache, log); } } publishProgress(++i); } } catch (final Exception e) { Log.e("FieldnoteExport.ExportTask generation", e); return false; } fieldNoteBuffer.append('\n'); if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { return false; } exportLocation.mkdirs(); final SimpleDateFormat fileNameDateFormat = new SimpleDateFormat("yyyyMMddHHmmss", Locale.US); exportFile = new File(exportLocation.toString() + '/' + fileNameDateFormat.format(new Date()) + ".txt"); Writer fileWriter = null; BufferedOutputStream buffer = null; try { final OutputStream os = new FileOutputStream(exportFile); buffer = new BufferedOutputStream(os); fileWriter = new OutputStreamWriter(buffer, CharEncoding.UTF_16); fileWriter.write(fieldNoteBuffer.toString()); } catch (final IOException e) { Log.e("FieldnoteExport.ExportTask export", e); return false; } finally { IOUtils.closeQuietly(fileWriter); IOUtils.closeQuietly(buffer); } if (upload) { publishProgress(STATUS_UPLOAD); if (!Login.isActualLoginStatus()) { // no need to upload (possibly large file) if we're not logged in final StatusCode loginState = Login.login(); if (loginState != StatusCode.NO_ERROR) { Log.e("FieldnoteExport.ExportTask upload: Login failed"); } } final String uri = "http://www.geocaching.com/my/uploadfieldnotes.aspx"; final String page = Login.getRequestLogged(uri, null); if (StringUtils.isBlank(page)) { Log.e("FieldnoteExport.ExportTask get page: No data from server"); return false; } final String[] viewstates = Login.getViewstates(page); final Parameters uploadParams = new Parameters( "__EVENTTARGET", "", "__EVENTARGUMENT", "", "ctl00$ContentBody$btnUpload", "Upload Field Note"); Login.putViewstates(uploadParams, viewstates); Network.getResponseData(Network.postRequest(uri, uploadParams, "ctl00$ContentBody$FieldNoteLoader", "text/plain", exportFile)); if (StringUtils.isBlank(page)) { Log.e("FieldnoteExport.ExportTask upload: No data from server"); return false; } } return true; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doInBackgroundInternal"
"@Override protected Boolean doInBackgroundInternal(Geocache[] caches) { final StringBuilder fieldNoteBuffer = new StringBuilder(); try { int i = 0; for (final Geocache cache : caches) { if (cache.isLogOffline()) { final LogEntry log = cgData.loadLogOffline(cache.getGeocode()); if (!onlyNew || onlyNew && log.date > Settings.getFieldnoteExportDate()) { appendFieldNote(fieldNoteBuffer, cache, log); } <MASK>publishProgress(++i);</MASK> } } } catch (final Exception e) { Log.e("FieldnoteExport.ExportTask generation", e); return false; } fieldNoteBuffer.append('\n'); if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { return false; } exportLocation.mkdirs(); final SimpleDateFormat fileNameDateFormat = new SimpleDateFormat("yyyyMMddHHmmss", Locale.US); exportFile = new File(exportLocation.toString() + '/' + fileNameDateFormat.format(new Date()) + ".txt"); Writer fileWriter = null; BufferedOutputStream buffer = null; try { final OutputStream os = new FileOutputStream(exportFile); buffer = new BufferedOutputStream(os); fileWriter = new OutputStreamWriter(buffer, CharEncoding.UTF_16); fileWriter.write(fieldNoteBuffer.toString()); } catch (final IOException e) { Log.e("FieldnoteExport.ExportTask export", e); return false; } finally { IOUtils.closeQuietly(fileWriter); IOUtils.closeQuietly(buffer); } if (upload) { publishProgress(STATUS_UPLOAD); if (!Login.isActualLoginStatus()) { // no need to upload (possibly large file) if we're not logged in final StatusCode loginState = Login.login(); if (loginState != StatusCode.NO_ERROR) { Log.e("FieldnoteExport.ExportTask upload: Login failed"); } } final String uri = "http://www.geocaching.com/my/uploadfieldnotes.aspx"; final String page = Login.getRequestLogged(uri, null); if (StringUtils.isBlank(page)) { Log.e("FieldnoteExport.ExportTask get page: No data from server"); return false; } final String[] viewstates = Login.getViewstates(page); final Parameters uploadParams = new Parameters( "__EVENTTARGET", "", "__EVENTARGUMENT", "", "ctl00$ContentBody$btnUpload", "Upload Field Note"); Login.putViewstates(uploadParams, viewstates); Network.getResponseData(Network.postRequest(uri, uploadParams, "ctl00$ContentBody$FieldNoteLoader", "text/plain", exportFile)); if (StringUtils.isBlank(page)) { Log.e("FieldnoteExport.ExportTask upload: No data from server"); return false; } } return true; }"
Inversion-Mutation
megadiff
"@Override public void process(final RESTManager restManager, final ErrorLoggerManager elm, final RESTUserV1 user) { final long startTime = System.currentTimeMillis(); final RESTReader reader = restManager.getReader(); boolean buildingFromConfig = false; // Add the details for the csprocessor.cfg if no ids are specified if (loadFromCSProcessorCfg()) { buildingFromConfig = true; setIds(CollectionUtilities.toArrayList(cspConfig.getContentSpecId().toString())); if (cspConfig.getRootOutputDirectory() != null && !cspConfig.getRootOutputDirectory().equals("")) { setOutputPath(cspConfig.getRootOutputDirectory()); } } // Check that an id was entered if (ids.size() == 0) { printError(Constants.ERROR_NO_ID_MSG, false); shutdown(Constants.EXIT_ARGUMENT_ERROR); } else if (ids.size() > 1) { printError(Constants.ERROR_MULTIPLE_ID_MSG, false); shutdown(Constants.EXIT_ARGUMENT_ERROR); } // Good point to check for a shutdown if (isAppShuttingDown()) { shutdown.set(true); return; } final String contentSpec = getContentSpecString(reader, ids.get(0)); // Good point to check for a shutdown if (isAppShuttingDown()) { shutdown.set(true); return; } JCommander.getConsole().println(Constants.STARTING_VALIDATE_MSG); // Setup the processing options final ProcessingOptions processingOptions = new ProcessingOptions(); processingOptions.setPermissiveMode(permissive); processingOptions.setValidating(true); processingOptions.setIgnoreChecksum(true); processingOptions.setAllowNewTopics(false); if (allowEmptyLevels) processingOptions.setAllowEmptyLevels(true); // Validate and parse the Content Specification csp = new ContentSpecProcessor(restManager, elm, processingOptions); boolean success = false; try { success = csp.processContentSpec(contentSpec, user, ContentSpecParser.ParsingMode.EITHER); } catch (Exception e) { JCommander.getConsole().println(elm.generateLogs()); shutdown(Constants.EXIT_FAILURE); } // Print the error/warning messages JCommander.getConsole().println(elm.generateLogs()); // Check that everything validated fine if (!success) { shutdown(Constants.EXIT_TOPIC_INVALID); } // Good point to check for a shutdown if (isAppShuttingDown()) { shutdown.set(true); return; } JCommander.getConsole().println(Constants.STARTING_BUILD_MSG); // Build the Content Specification byte[] builderOutput = null; try { builder = new ContentSpecBuilder(restManager); builderOutput = builder.buildBook(csp.getContentSpec(), user, getBuildOptions()); } catch (Exception e) { printError(Constants.ERROR_INTERNAL_ERROR, false); shutdown(Constants.EXIT_INTERNAL_SERVER_ERROR); } // Print the success messages long elapsedTime = System.currentTimeMillis() - startTime; JCommander.getConsole().println(String.format(Constants.ZIP_SAVED_ERRORS_MSG, builder.getNumErrors(), builder.getNumWarnings()) + (builder.getNumErrors() == 0 && builder.getNumWarnings() == 0 ? " - Flawless Victory!" : "")); if (executionTime) { JCommander.getConsole().println(String.format(Constants.EXEC_TIME_MSG, elapsedTime)); } // Create the output file String fileName = DocBookUtilities.escapeTitle(csp.getContentSpec().getTitle()); String outputDir = ""; if (buildingFromConfig) { outputDir = (cspConfig.getRootOutputDirectory() == null || cspConfig.getRootOutputDirectory().equals("") ? "" : (fileName + File.separator)) + Constants.DEFAULT_CONFIG_ZIP_LOCATION; fileName += "-publican.zip"; } else { fileName += ".zip"; } // Create the fully qaulified output path if (outputPath != null && outputPath.endsWith("/")) { output = new File(outputPath + outputDir + fileName); } else if (outputPath == null) { output = new File(outputDir + fileName); } else { output = new File(outputPath); } // Make sure the directories exist if (output.isDirectory()) { output.mkdirs(); } else { if (output.getParentFile() != null) output.getParentFile().mkdirs(); } String answer = "y"; // Check if the file exists. If it does then check if the file should be overwritten if (!buildingFromConfig && output.exists()) { JCommander.getConsole().println(String.format(Constants.FILE_EXISTS_OVERWRITE_MSG, fileName)); answer = JCommander.getConsole().readLine(); while (!(answer.equalsIgnoreCase("y") || answer.equalsIgnoreCase("n") || answer.equalsIgnoreCase("yes") || answer.equalsIgnoreCase("no"))) { JCommander.getConsole().print(String.format(Constants.FILE_EXISTS_OVERWRITE_MSG, fileName)); answer = JCommander.getConsole().readLine(); // Need to check if the app is shutting down in this loop if (isAppShuttingDown()) { shutdown.set(true); return; } } } // Save the book to file try { if (answer.equalsIgnoreCase("y") || answer.equalsIgnoreCase("yes")) { FileOutputStream fos = new FileOutputStream(output); fos.write(builderOutput); fos.flush(); fos.close(); JCommander.getConsole().println(String.format(Constants.OUTPUT_SAVED_MSG, output.getAbsolutePath())); } else { shutdown(Constants.EXIT_FAILURE); } } catch (IOException e) { printError(Constants.ERROR_FAILED_SAVING, false); shutdown(Constants.EXIT_FAILURE); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "process"
"@Override public void process(final RESTManager restManager, final ErrorLoggerManager elm, final RESTUserV1 user) { final long startTime = System.currentTimeMillis(); final RESTReader reader = restManager.getReader(); boolean buildingFromConfig = false; // Add the details for the csprocessor.cfg if no ids are specified if (loadFromCSProcessorCfg()) { buildingFromConfig = true; setIds(CollectionUtilities.toArrayList(cspConfig.getContentSpecId().toString())); if (cspConfig.getRootOutputDirectory() != null && !cspConfig.getRootOutputDirectory().equals("")) { setOutputPath(cspConfig.getRootOutputDirectory()); } } // Check that an id was entered if (ids.size() == 0) { printError(Constants.ERROR_NO_ID_MSG, false); shutdown(Constants.EXIT_ARGUMENT_ERROR); } else if (ids.size() > 1) { printError(Constants.ERROR_MULTIPLE_ID_MSG, false); shutdown(Constants.EXIT_ARGUMENT_ERROR); } // Good point to check for a shutdown if (isAppShuttingDown()) { shutdown.set(true); return; } final String contentSpec = getContentSpecString(reader, ids.get(0)); // Good point to check for a shutdown if (isAppShuttingDown()) { shutdown.set(true); return; } JCommander.getConsole().println(Constants.STARTING_VALIDATE_MSG); // Setup the processing options final ProcessingOptions processingOptions = new ProcessingOptions(); processingOptions.setPermissiveMode(permissive); processingOptions.setValidating(true); processingOptions.setIgnoreChecksum(true); processingOptions.setAllowNewTopics(false); if (allowEmptyLevels) processingOptions.setAllowEmptyLevels(true); // Validate and parse the Content Specification csp = new ContentSpecProcessor(restManager, elm, processingOptions); boolean success = false; try { success = csp.processContentSpec(contentSpec, user, ContentSpecParser.ParsingMode.EITHER); } catch (Exception e) { shutdown(Constants.EXIT_FAILURE); } // Print the error/warning messages <MASK>JCommander.getConsole().println(elm.generateLogs());</MASK> // Check that everything validated fine if (!success) { <MASK>JCommander.getConsole().println(elm.generateLogs());</MASK> shutdown(Constants.EXIT_TOPIC_INVALID); } // Good point to check for a shutdown if (isAppShuttingDown()) { shutdown.set(true); return; } JCommander.getConsole().println(Constants.STARTING_BUILD_MSG); // Build the Content Specification byte[] builderOutput = null; try { builder = new ContentSpecBuilder(restManager); builderOutput = builder.buildBook(csp.getContentSpec(), user, getBuildOptions()); } catch (Exception e) { printError(Constants.ERROR_INTERNAL_ERROR, false); shutdown(Constants.EXIT_INTERNAL_SERVER_ERROR); } // Print the success messages long elapsedTime = System.currentTimeMillis() - startTime; JCommander.getConsole().println(String.format(Constants.ZIP_SAVED_ERRORS_MSG, builder.getNumErrors(), builder.getNumWarnings()) + (builder.getNumErrors() == 0 && builder.getNumWarnings() == 0 ? " - Flawless Victory!" : "")); if (executionTime) { JCommander.getConsole().println(String.format(Constants.EXEC_TIME_MSG, elapsedTime)); } // Create the output file String fileName = DocBookUtilities.escapeTitle(csp.getContentSpec().getTitle()); String outputDir = ""; if (buildingFromConfig) { outputDir = (cspConfig.getRootOutputDirectory() == null || cspConfig.getRootOutputDirectory().equals("") ? "" : (fileName + File.separator)) + Constants.DEFAULT_CONFIG_ZIP_LOCATION; fileName += "-publican.zip"; } else { fileName += ".zip"; } // Create the fully qaulified output path if (outputPath != null && outputPath.endsWith("/")) { output = new File(outputPath + outputDir + fileName); } else if (outputPath == null) { output = new File(outputDir + fileName); } else { output = new File(outputPath); } // Make sure the directories exist if (output.isDirectory()) { output.mkdirs(); } else { if (output.getParentFile() != null) output.getParentFile().mkdirs(); } String answer = "y"; // Check if the file exists. If it does then check if the file should be overwritten if (!buildingFromConfig && output.exists()) { JCommander.getConsole().println(String.format(Constants.FILE_EXISTS_OVERWRITE_MSG, fileName)); answer = JCommander.getConsole().readLine(); while (!(answer.equalsIgnoreCase("y") || answer.equalsIgnoreCase("n") || answer.equalsIgnoreCase("yes") || answer.equalsIgnoreCase("no"))) { JCommander.getConsole().print(String.format(Constants.FILE_EXISTS_OVERWRITE_MSG, fileName)); answer = JCommander.getConsole().readLine(); // Need to check if the app is shutting down in this loop if (isAppShuttingDown()) { shutdown.set(true); return; } } } // Save the book to file try { if (answer.equalsIgnoreCase("y") || answer.equalsIgnoreCase("yes")) { FileOutputStream fos = new FileOutputStream(output); fos.write(builderOutput); fos.flush(); fos.close(); JCommander.getConsole().println(String.format(Constants.OUTPUT_SAVED_MSG, output.getAbsolutePath())); } else { shutdown(Constants.EXIT_FAILURE); } } catch (IOException e) { printError(Constants.ERROR_FAILED_SAVING, false); shutdown(Constants.EXIT_FAILURE); } }"
Inversion-Mutation
megadiff
"public Chunk(World world, int i0, int i1) { canaryChunk = new CanaryChunk(this); // CanaryMod: wrap chunk this.r = new ExtendedBlockStorage[16]; this.s = new byte[256]; this.b = new int[256]; this.c = new boolean[256]; this.t = false; this.i = new HashMap(); this.k = false; this.l = false; this.m = false; this.n = 0L; this.o = false; this.p = 0; this.u = 4096; this.q = false; this.j = new List[16]; this.e = world; this.g = i0; this.h = i1; this.f = new int[256]; for (int i2 = 0; i2 < this.j.length; ++i2) { this.j[i2] = new ArrayList(); } Arrays.fill(this.b, -999); Arrays.fill(this.s, (byte) -1); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Chunk"
"public Chunk(World world, int i0, int i1) { this.r = new ExtendedBlockStorage[16]; this.s = new byte[256]; this.b = new int[256]; this.c = new boolean[256]; this.t = false; this.i = new HashMap(); this.k = false; this.l = false; this.m = false; this.n = 0L; this.o = false; this.p = 0; this.u = 4096; this.q = false; this.j = new List[16]; this.e = world; this.g = i0; this.h = i1; this.f = new int[256]; for (int i2 = 0; i2 < this.j.length; ++i2) { this.j[i2] = new ArrayList(); } Arrays.fill(this.b, -999); Arrays.fill(this.s, (byte) -1); <MASK>canaryChunk = new CanaryChunk(this); // CanaryMod: wrap chunk</MASK> }"
Inversion-Mutation
megadiff
"public void popupDismissed(boolean topPopupOnly) { initializePopup(); // if the 2nd level popup gets dismissed if (mPopupStatus == POPUP_SECOND_LEVEL) { mPopupStatus = POPUP_FIRST_LEVEL; if (topPopupOnly) mModule.showPopup(mPopup); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "popupDismissed"
"public void popupDismissed(boolean topPopupOnly) { // if the 2nd level popup gets dismissed if (mPopupStatus == POPUP_SECOND_LEVEL) { <MASK>initializePopup();</MASK> mPopupStatus = POPUP_FIRST_LEVEL; if (topPopupOnly) mModule.showPopup(mPopup); } }"
Inversion-Mutation
megadiff
"@Override public void map(WritableComparable docID, Text docContents, Context context) throws IOException, InterruptedException { Matcher matcher = WORD_PATTERN.matcher(docContents.toString()); Func func = funcFromNum(funcNum); // YOUR CODE HERE // make a copy of the Matcher for parsing, record indices of targets to list Matcher copy = WORD_PATTERN.matcher(docContents.toString()); List<Double> targets = new ArrayList<Double>(); double count = 0; while(copy.find()){ String w = copy.group().toLowerCase(); if(w.equals(targetGram)) targets.add(new Double(count)); count++; } if(targets.isEmpty()){ while(matcher.find()) context.write(new Text(matcher.group().toLowerCase()), new DoublePair(1.0, func.f(Double.POSITIVE_INFINITY))); } else{ count = 0; while(matcher.find()){ String word = matcher.group().toLowerCase(); // if word is not target word if(!word.equals(targetGram)){ context.write(new Text(word), new DoublePair(1.0, func.f(closestDist(targets, count)))); System.out.println(word + " " + closestDist(targets, count) + " _ " + func.f(closestDist(targets, count))); } count++; } } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "map"
"@Override public void map(WritableComparable docID, Text docContents, Context context) throws IOException, InterruptedException { Matcher matcher = WORD_PATTERN.matcher(docContents.toString()); Func func = funcFromNum(funcNum); // YOUR CODE HERE // make a copy of the Matcher for parsing, record indices of targets to list Matcher copy = WORD_PATTERN.matcher(docContents.toString()); List<Double> targets = new ArrayList<Double>(); double count = 0; while(copy.find()){ String w = copy.group().toLowerCase(); if(w.equals(targetGram)) targets.add(new Double(count)); <MASK>count++;</MASK> } if(targets.isEmpty()){ while(matcher.find()) context.write(new Text(matcher.group().toLowerCase()), new DoublePair(1.0, func.f(Double.POSITIVE_INFINITY))); } else{ count = 0; while(matcher.find()){ String word = matcher.group().toLowerCase(); // if word is not target word if(!word.equals(targetGram)){ context.write(new Text(word), new DoublePair(1.0, func.f(closestDist(targets, count)))); System.out.println(word + " " + closestDist(targets, count) + " _ " + func.f(closestDist(targets, count))); <MASK>count++;</MASK> } } } }"
Inversion-Mutation
megadiff
"public SimulatorGuiManager(Display d) { canSpawn = true; gridPanel = new GridPanel(this); initSim("New Simulation",10, 10); sm = new ScreenManager(d); sm.putScreen("Title", new TitleScreen(this)); sm.putScreen("New Simulation", new NewSimulationScreen(this)); sm.putScreen("Edit Fields", new EditFieldScreen(this)); sm.putScreen("Edit Entities", new EditEntityScreen(this)); sm.putScreen("View Simulation", new ViewSimScreen(this)); sm.putScreen("Statistics", new StatDisplayScreen(this)); sm.putScreen("Grid Setup", new SetupScreen(this)); sm.getDisplay().setJMenuBar(makeMenuBar()); se = new SimulationEnder(); loader = new Loader(); statMan = StatisticsManager.getInstance(); hasStarted = false; gpo = new GridPanelObserver(gridPanel); fc = new JFileChooser(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "SimulatorGuiManager"
"public SimulatorGuiManager(Display d) { canSpawn = true; <MASK>initSim("New Simulation",10, 10);</MASK> gridPanel = new GridPanel(this); sm = new ScreenManager(d); sm.putScreen("Title", new TitleScreen(this)); sm.putScreen("New Simulation", new NewSimulationScreen(this)); sm.putScreen("Edit Fields", new EditFieldScreen(this)); sm.putScreen("Edit Entities", new EditEntityScreen(this)); sm.putScreen("View Simulation", new ViewSimScreen(this)); sm.putScreen("Statistics", new StatDisplayScreen(this)); sm.putScreen("Grid Setup", new SetupScreen(this)); sm.getDisplay().setJMenuBar(makeMenuBar()); se = new SimulationEnder(); loader = new Loader(); statMan = StatisticsManager.getInstance(); hasStarted = false; gpo = new GridPanelObserver(gridPanel); fc = new JFileChooser(); }"
Inversion-Mutation
megadiff
"public void start(BundleContext context) throws Exception { super.start(context); plugin = this; YEditLog.initializeTraceLogger(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start"
"public void start(BundleContext context) throws Exception { super.start(context); <MASK>YEditLog.initializeTraceLogger();</MASK> plugin = this; }"
Inversion-Mutation
megadiff
"private void removeNodes(final ITeamNode[] nodes) { // Update the model for (int i = 0; i < nodes.length; i++) { if (nodes[i].getClass() == UnchangedTeamContainer.class) { // Unchanged containers get removed automatically when all // children are removed continue; } if (nodes[i].getClass() == ChangedTeamContainer.class) { // If this node still has children, convert to an // unchanged container, then it will disappear when // all children have been removed. ChangedTeamContainer container = (ChangedTeamContainer)nodes[i]; IDiffElement[] children = container.getChildren(); if (children.length > 0) { IDiffContainer parent = container.getParent(); UnchangedTeamContainer unchanged = new UnchangedTeamContainer(parent, container.getResource()); for (int j = 0; j < children.length; j++) { unchanged.add(children[j]); } parent.removeToRoot(container); continue; } // No children, it will get removed below. } nodes[i].getParent().removeToRoot(nodes[i]); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeNodes"
"private void removeNodes(final ITeamNode[] nodes) { // Update the model for (int i = 0; i < nodes.length; i++) { if (nodes[i].getClass() == UnchangedTeamContainer.class) { // Unchanged containers get removed automatically when all // children are removed continue; } if (nodes[i].getClass() == ChangedTeamContainer.class) { // If this node still has children, convert to an // unchanged container, then it will disappear when // all children have been removed. ChangedTeamContainer container = (ChangedTeamContainer)nodes[i]; IDiffElement[] children = container.getChildren(); if (children.length > 0) { IDiffContainer parent = container.getParent(); <MASK>parent.removeToRoot(container);</MASK> UnchangedTeamContainer unchanged = new UnchangedTeamContainer(parent, container.getResource()); for (int j = 0; j < children.length; j++) { unchanged.add(children[j]); } continue; } // No children, it will get removed below. } nodes[i].getParent().removeToRoot(nodes[i]); } }"
Inversion-Mutation
megadiff
"public ArrayList<Activity> getAllActivities(){ SQLiteDatabase db = this.getReadableDatabase(); ArrayList<Activity> acts = new ArrayList<Activity>(); String selectQuery = "Select * From " + ACT_TABLE; Cursor cursor = db.rawQuery(selectQuery, null); if(cursor != null){ cursor.moveToFirst(); while(cursor.isAfterLast() != true){ Activity act = new Activity(); act.setId(cursor.getInt(0)); act.setName(cursor.getString(1)); act.setSubType(cursor.getInt(2)); act.setDescription(cursor.getString(3)); act.setImage(cursor.getString(4)); acts.add(act); cursor.moveToNext(); }//end of while }//end of if return acts; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getAllActivities"
"public ArrayList<Activity> getAllActivities(){ SQLiteDatabase db = this.getReadableDatabase(); ArrayList<Activity> acts = new ArrayList<Activity>(); <MASK>Activity act = new Activity();</MASK> String selectQuery = "Select * From " + ACT_TABLE; Cursor cursor = db.rawQuery(selectQuery, null); if(cursor != null){ cursor.moveToFirst(); while(cursor.isAfterLast() != true){ act.setId(cursor.getInt(0)); act.setName(cursor.getString(1)); act.setSubType(cursor.getInt(2)); act.setDescription(cursor.getString(3)); act.setImage(cursor.getString(4)); acts.add(act); cursor.moveToNext(); }//end of while }//end of if return acts; }"
Inversion-Mutation
megadiff
"void renderInitialization( final Label label ) throws IOException { JSWriter writer = JSWriter.getWriterFor( label ); writer.newWidget( QX_TYPE ); ControlLCAUtil.writeStyleFlags( label ); Boolean wrap = Boolean.valueOf( ( label.getStyle() & SWT.WRAP ) != 0 ); Object[] args = { label }; writer.callStatic( "org.eclipse.swt.LabelUtil.initialize", args ); Object[] argsWrap = { label, wrap }; writer.callStatic( "org.eclipse.swt.LabelUtil.setWrap", argsWrap ); WidgetLCAUtil.writeCustomAppearance( label ); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "renderInitialization"
"void renderInitialization( final Label label ) throws IOException { JSWriter writer = JSWriter.getWriterFor( label ); writer.newWidget( QX_TYPE ); <MASK>WidgetLCAUtil.writeCustomAppearance( label );</MASK> ControlLCAUtil.writeStyleFlags( label ); Boolean wrap = Boolean.valueOf( ( label.getStyle() & SWT.WRAP ) != 0 ); Object[] args = { label }; writer.callStatic( "org.eclipse.swt.LabelUtil.initialize", args ); Object[] argsWrap = { label, wrap }; writer.callStatic( "org.eclipse.swt.LabelUtil.setWrap", argsWrap ); }"
Inversion-Mutation
megadiff
"private static String printRow(final long startTime, final String scriptName, final Long workloadLength, final Long numOfTransactionsExecuted, final Long numOfTransactionsSuccessful, final Long totalTimeOfSuccessfulTranscations, final Long totalTimeOfUnSuccessfulTransactions) { StringBuilder row = new StringBuilder(startTime + ""); row = appendToRow(row, scriptName); row = appendToRow(row, workloadLength); row = appendToRow(row, numOfTransactionsExecuted); row = appendToRow(row, numOfTransactionsSuccessful); row = appendToRow(row, totalTimeOfSuccessfulTranscations); row = appendToRow(row, totalTimeOfUnSuccessfulTransactions); row = endRow(row); return row.toString(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "printRow"
"private static String printRow(final long startTime, final String scriptName, final Long workloadLength, final Long numOfTransactionsExecuted, final Long numOfTransactionsSuccessful, final Long totalTimeOfSuccessfulTranscations, final Long totalTimeOfUnSuccessfulTransactions) { StringBuilder row = new StringBuilder(startTime + ""); <MASK>row = appendToRow(row, workloadLength);</MASK> row = appendToRow(row, scriptName); row = appendToRow(row, numOfTransactionsExecuted); row = appendToRow(row, numOfTransactionsSuccessful); row = appendToRow(row, totalTimeOfSuccessfulTranscations); row = appendToRow(row, totalTimeOfUnSuccessfulTransactions); row = endRow(row); return row.toString(); }"
Inversion-Mutation
megadiff
"public static void ensureNeededBundlesAvailable() throws BundleException { // check bundles available assertBundleAvailable("org.lunifera.runtime.web.jetty"); assertBundleAvailable("org.eclipse.equinox.util"); assertBundleAvailable("org.eclipse.equinox.cm"); assertBundleAvailable("org.eclipse.equinox.ds"); // stop jetty Bundle jetty = BundleUtils.findBundle(Activator.context, "org.eclipse.equinox.http.jetty"); if (jetty != null) { jetty.stop(); } // start ds Bundle ds = BundleUtils.findBundle(Activator.context, "org.eclipse.equinox.ds"); if (ds == null) { throw new IllegalStateException( "Bundle org.eclipse.equinox.ds is missing!"); } if (ds.getState() != Bundle.STARTING && ds.getState() != Bundle.ACTIVE) { ds.start(); } // start cm Bundle cm = BundleUtils.findBundle(Activator.context, "org.eclipse.equinox.cm"); if (cm == null) { throw new IllegalStateException( "Bundle org.eclipse.equinox.cm is missing!"); } if (cm.getState() != Bundle.STARTING && cm.getState() != Bundle.ACTIVE) { cm.start(); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ensureNeededBundlesAvailable"
"public static void ensureNeededBundlesAvailable() throws BundleException { // check bundles available assertBundleAvailable("org.lunifera.runtime.web.jetty"); <MASK>assertBundleAvailable("org.eclipse.equinox.ds");</MASK> assertBundleAvailable("org.eclipse.equinox.util"); assertBundleAvailable("org.eclipse.equinox.cm"); // stop jetty Bundle jetty = BundleUtils.findBundle(Activator.context, "org.eclipse.equinox.http.jetty"); if (jetty != null) { jetty.stop(); } // start ds Bundle ds = BundleUtils.findBundle(Activator.context, "org.eclipse.equinox.ds"); if (ds == null) { throw new IllegalStateException( "Bundle org.eclipse.equinox.ds is missing!"); } if (ds.getState() != Bundle.STARTING && ds.getState() != Bundle.ACTIVE) { ds.start(); } // start cm Bundle cm = BundleUtils.findBundle(Activator.context, "org.eclipse.equinox.cm"); if (cm == null) { throw new IllegalStateException( "Bundle org.eclipse.equinox.cm is missing!"); } if (cm.getState() != Bundle.STARTING && cm.getState() != Bundle.ACTIVE) { cm.start(); } }"
Inversion-Mutation
megadiff
"public boolean processBitstream(Context c, Item item, Bitstream source, boolean overWrite) throws Exception { // get bitstream filename, calculate destination filename String newName = getFilteredName(source.getName()); Bitstream existingBitstream = null; // is there an existing rendition? Bundle targetBundle = null; // bundle we're modifying Bundle [] bundles = item.getBundles(getBundleName()); // check if destination bitstream exists if( bundles.length > 0 ) { // only finds the last match (FIXME?) for(int i = 0; i < bundles.length; i++) { Bitstream [] bitstreams = bundles[i].getBitstreams(); for(int j = 0; j < bitstreams.length; j++) { if(bitstreams[j].getName().equals(newName)) { targetBundle = bundles[i]; existingBitstream = bitstreams[j]; } } } } // if exists and overwrite = false, exit if( !overWrite && (existingBitstream!=null) ) { System.out.println("SKIPPED: bitstream " + source.getID() + " because '" + newName + "' already exists"); return false; } // create new bundle if needed if( bundles.length < 1 ) { targetBundle=item.createBundle(getBundleName()); } else { // take the first match targetBundle = bundles[0]; } InputStream destStream = getDestinationStream(source.retrieve()); Bitstream b = targetBundle.createBitstream(destStream); // Now set the format and name of the bitstream b.setName(newName); b.setSource("Written by MediaFilter " + this.getClass().getName() ); // or obj.getClass().getName(); // Find the proper format BitstreamFormat bf = BitstreamFormat.findByShortDescription( c, getFormatString()); b.setFormat(bf); b.update(); // fixme - set date? // we are overwriting, so remove old bitstream if(existingBitstream != null) { targetBundle.removeBitstream(existingBitstream); } System.out.println("FILTERED: bitstream "+source.getID()+" and created '" + newName + "'"); return true; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processBitstream"
"public boolean processBitstream(Context c, Item item, Bitstream source, boolean overWrite) throws Exception { // get bitstream filename, calculate destination filename String newName = getFilteredName(source.getName()); Bitstream existingBitstream = null; // is there an existing rendition? Bundle targetBundle = null; // bundle we're modifying Bundle [] bundles = item.getBundles(getBundleName()); // check if destination bitstream exists if( bundles.length > 0 ) { // only finds the last match (FIXME?) for(int i = 0; i < bundles.length; i++) { Bitstream [] bitstreams = bundles[i].getBitstreams(); for(int j = 0; j < bitstreams.length; j++) { if(bitstreams[j].getName().equals(newName)) { targetBundle = bundles[i]; existingBitstream = bitstreams[j]; } } } } // if exists and overwrite = false, exit if( !overWrite && (existingBitstream!=null) ) { System.out.println("SKIPPED: bitstream " + source.getID() + " because '" + newName + "' already exists"); return false; } // create new bundle if needed if( bundles.length < 1 ) { targetBundle=item.createBundle(getBundleName()); } else { // take the first match targetBundle = bundles[0]; } InputStream destStream = getDestinationStream(source.retrieve()); Bitstream b = targetBundle.createBitstream(destStream); // Now set the format and name of the bitstream b.setName(newName); b.setSource("Written by MediaFilter " + this.getClass().getName() ); // or obj.getClass().getName(); <MASK>b.update();</MASK> // Find the proper format BitstreamFormat bf = BitstreamFormat.findByShortDescription( c, getFormatString()); b.setFormat(bf); // fixme - set date? // we are overwriting, so remove old bitstream if(existingBitstream != null) { targetBundle.removeBitstream(existingBitstream); } System.out.println("FILTERED: bitstream "+source.getID()+" and created '" + newName + "'"); return true; }"
Inversion-Mutation
megadiff
"public void open(String name, int mode, boolean timeout) throws IOException { if(name.charAt(0) != '/' || name.charAt(1) != '/') { throw new IllegalArgumentException("Protocol must start with \"//\" "+name); } name = name.substring(2); /* * If 'name' == null then we are a server endpoint at port 'port' * * If 'name' != null we are a client endpoint at an port decided by the system * and the default address for datagrams to be send is 'host':'port' */ /* name does not have port number, just a colon, hence it should at * system assigned port. */ if (name.substring(name.indexOf(':') + 1).length() == 0) { /* Open a random port for a datagram client */ endpoint = new DatagramSocket(); } else { host = getAddress(name); port = getPort(name); if(port <= 0) { throw new IllegalArgumentException("Bad port number \"//\" "+name); } checkMIDPPermission(host, port); if(host == null) { /* Open a server datagram socket (no host given) */ endpoint = new DatagramSocket(port); } else { /* Open a random port for a datagram client */ endpoint = new DatagramSocket(); } } open = true; try { byte[] testbuf = new byte[256]; DatagramPacket testdgram = new DatagramPacket(testbuf, 256); if (host != null) { testdgram.setAddress(InetAddress.getByName(host)); } else { testdgram.setAddress(InetAddress.getByName("localhost")); } testdgram.setPort(port); } catch(NumberFormatException x) { throw new IllegalArgumentException("Invalid datagram address " +host+":"+port); } catch(UnknownHostException x) { throw new IllegalArgumentException("Unknown host "+host+":"+port); } catch(SecurityException se) { // Don't need to report on the security // exceptions yet at this point } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "open"
"public void open(String name, int mode, boolean timeout) throws IOException { if(name.charAt(0) != '/' || name.charAt(1) != '/') { throw new IllegalArgumentException("Protocol must start with \"//\" "+name); } name = name.substring(2); <MASK>host = getAddress(name);</MASK> /* * If 'name' == null then we are a server endpoint at port 'port' * * If 'name' != null we are a client endpoint at an port decided by the system * and the default address for datagrams to be send is 'host':'port' */ /* name does not have port number, just a colon, hence it should at * system assigned port. */ if (name.substring(name.indexOf(':') + 1).length() == 0) { /* Open a random port for a datagram client */ endpoint = new DatagramSocket(); } else { port = getPort(name); if(port <= 0) { throw new IllegalArgumentException("Bad port number \"//\" "+name); } checkMIDPPermission(host, port); if(host == null) { /* Open a server datagram socket (no host given) */ endpoint = new DatagramSocket(port); } else { /* Open a random port for a datagram client */ endpoint = new DatagramSocket(); } } open = true; try { byte[] testbuf = new byte[256]; DatagramPacket testdgram = new DatagramPacket(testbuf, 256); if (host != null) { testdgram.setAddress(InetAddress.getByName(host)); } else { testdgram.setAddress(InetAddress.getByName("localhost")); } testdgram.setPort(port); } catch(NumberFormatException x) { throw new IllegalArgumentException("Invalid datagram address " +host+":"+port); } catch(UnknownHostException x) { throw new IllegalArgumentException("Unknown host "+host+":"+port); } catch(SecurityException se) { // Don't need to report on the security // exceptions yet at this point } }"
Inversion-Mutation
megadiff
"private byte[] getResizedImageData(int widthLimit, int heightLimit, int byteLimit) { int outWidth = mWidth; int outHeight = mHeight; float scaleFactor = 1.F; while ((outWidth * scaleFactor > widthLimit) || (outHeight * scaleFactor > heightLimit)) { scaleFactor *= .75F; } if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) { Log.v(TAG, "getResizedImageData: wlimit=" + widthLimit + ", hlimit=" + heightLimit + ", sizeLimit=" + byteLimit + ", mWidth=" + mWidth + ", mHeight=" + mHeight + ", initialScaleFactor=" + scaleFactor + ", mUri=" + mUri); } InputStream input = null; try { ByteArrayOutputStream os = null; int attempts = 1; int sampleSize = 1; BitmapFactory.Options options = new BitmapFactory.Options(); int quality = MessageUtils.IMAGE_COMPRESSION_QUALITY; Bitmap b = null; // In this loop, attempt to decode the stream with the best possible subsampling (we // start with 1, which means no subsampling - get the original content) without running // out of memory. do { input = mContext.getContentResolver().openInputStream(mUri); options.inSampleSize = sampleSize; try { b = BitmapFactory.decodeStream(input, null, options); } catch (OutOfMemoryError e) { Log.w(TAG, "getResizedImageData: img too large to decode (OutOfMemoryError), " + "may try with larger sampleSize. Curr sampleSize=" + sampleSize); sampleSize *= 2; // works best as a power of two attempts++; continue; } finally { if (input != null) { try { input.close(); } catch (IOException e) { Log.e(TAG, e.getMessage(), e); } } } } while (b == null && attempts < NUMBER_OF_RESIZE_ATTEMPTS); if (b == null) { return null; } attempts = 1; // reset count for second loop // In this loop, we attempt to compress/resize the content to fit the given dimension // and file-size limits. do { try { if (options.outWidth > widthLimit || options.outHeight > heightLimit) { // The decoder does not support the inSampleSize option. // Scale the bitmap using Bitmap library. int scaledWidth = (int)(outWidth * scaleFactor); int scaledHeight = (int)(outHeight * scaleFactor); if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) { Log.v(TAG, "getResizedImageData: retry scaling using " + "Bitmap.createScaledBitmap: w=" + scaledWidth + ", h=" + scaledHeight); } b = Bitmap.createScaledBitmap(b, scaledWidth, scaledHeight, false); if (b == null) { return null; } } // Compress the image into a JPG. Start with MessageUtils.IMAGE_COMPRESSION_QUALITY. // In case that the image byte size is still too large reduce the quality in // proportion to the desired byte size. Should the quality fall below // MINIMUM_IMAGE_COMPRESSION_QUALITY skip a compression attempt and we will enter // the next round with a smaller image to start with. os = new ByteArrayOutputStream(); b.compress(CompressFormat.JPEG, quality, os); int jpgFileSize = os.size(); if (jpgFileSize > byteLimit) { int reducedQuality = quality * byteLimit / jpgFileSize; if (reducedQuality >= MessageUtils.MINIMUM_IMAGE_COMPRESSION_QUALITY) { quality = reducedQuality; if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) { Log.v(TAG, "getResizedImageData: compress(2) w/ quality=" + quality); } os = new ByteArrayOutputStream(); b.compress(CompressFormat.JPEG, quality, os); } } } catch (java.lang.OutOfMemoryError e) { Log.w(TAG, "getResizedImageData - image too big (OutOfMemoryError), will try " + " with smaller scale factor, cur scale factor: " + scaleFactor); // fall through and keep trying with a smaller scale factor. } if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) { Log.v(TAG, "attempt=" + attempts + " size=" + (os == null ? 0 : os.size()) + " width=" + outWidth * scaleFactor + " height=" + outHeight * scaleFactor + " scaleFactor=" + scaleFactor + " quality=" + quality); } scaleFactor *= .75F; attempts++; } while ((os == null || os.size() > byteLimit) && attempts < NUMBER_OF_RESIZE_ATTEMPTS); b.recycle(); // done with the bitmap, release the memory return os == null ? null : os.toByteArray(); } catch (FileNotFoundException e) { Log.e(TAG, e.getMessage(), e); return null; } catch (java.lang.OutOfMemoryError e) { Log.e(TAG, e.getMessage(), e); return null; } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getResizedImageData"
"private byte[] getResizedImageData(int widthLimit, int heightLimit, int byteLimit) { int outWidth = mWidth; int outHeight = mHeight; float scaleFactor = 1.F; while ((outWidth * scaleFactor > widthLimit) || (outHeight * scaleFactor > heightLimit)) { scaleFactor *= .75F; } if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) { Log.v(TAG, "getResizedImageData: wlimit=" + widthLimit + ", hlimit=" + heightLimit + ", sizeLimit=" + byteLimit + ", mWidth=" + mWidth + ", mHeight=" + mHeight + ", initialScaleFactor=" + scaleFactor + ", mUri=" + mUri); } InputStream input = null; try { ByteArrayOutputStream os = null; int attempts = 1; int sampleSize = 1; BitmapFactory.Options options = new BitmapFactory.Options(); int quality = MessageUtils.IMAGE_COMPRESSION_QUALITY; Bitmap b = null; // In this loop, attempt to decode the stream with the best possible subsampling (we // start with 1, which means no subsampling - get the original content) without running // out of memory. do { input = mContext.getContentResolver().openInputStream(mUri); options.inSampleSize = sampleSize; try { b = BitmapFactory.decodeStream(input, null, options); } catch (OutOfMemoryError e) { Log.w(TAG, "getResizedImageData: img too large to decode (OutOfMemoryError), " + "may try with larger sampleSize. Curr sampleSize=" + sampleSize); sampleSize *= 2; // works best as a power of two attempts++; continue; } finally { if (input != null) { try { input.close(); } catch (IOException e) { Log.e(TAG, e.getMessage(), e); } } } } while (b == null && attempts < NUMBER_OF_RESIZE_ATTEMPTS); if (b == null) { return null; } attempts = 1; // reset count for second loop // In this loop, we attempt to compress/resize the content to fit the given dimension // and file-size limits. do { try { if (options.outWidth > widthLimit || options.outHeight > heightLimit) { // The decoder does not support the inSampleSize option. // Scale the bitmap using Bitmap library. int scaledWidth = (int)(outWidth * scaleFactor); int scaledHeight = (int)(outHeight * scaleFactor); if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) { Log.v(TAG, "getResizedImageData: retry scaling using " + "Bitmap.createScaledBitmap: w=" + scaledWidth + ", h=" + scaledHeight); } b = Bitmap.createScaledBitmap(b, scaledWidth, scaledHeight, false); if (b == null) { return null; } } // Compress the image into a JPG. Start with MessageUtils.IMAGE_COMPRESSION_QUALITY. // In case that the image byte size is still too large reduce the quality in // proportion to the desired byte size. Should the quality fall below // MINIMUM_IMAGE_COMPRESSION_QUALITY skip a compression attempt and we will enter // the next round with a smaller image to start with. os = new ByteArrayOutputStream(); b.compress(CompressFormat.JPEG, quality, os); int jpgFileSize = os.size(); if (jpgFileSize > byteLimit) { int reducedQuality = quality * byteLimit / jpgFileSize; if (reducedQuality >= MessageUtils.MINIMUM_IMAGE_COMPRESSION_QUALITY) { quality = reducedQuality; if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) { Log.v(TAG, "getResizedImageData: compress(2) w/ quality=" + quality); } os = new ByteArrayOutputStream(); b.compress(CompressFormat.JPEG, quality, os); } } <MASK>b.recycle(); // done with the bitmap, release the memory</MASK> } catch (java.lang.OutOfMemoryError e) { Log.w(TAG, "getResizedImageData - image too big (OutOfMemoryError), will try " + " with smaller scale factor, cur scale factor: " + scaleFactor); // fall through and keep trying with a smaller scale factor. } if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) { Log.v(TAG, "attempt=" + attempts + " size=" + (os == null ? 0 : os.size()) + " width=" + outWidth * scaleFactor + " height=" + outHeight * scaleFactor + " scaleFactor=" + scaleFactor + " quality=" + quality); } scaleFactor *= .75F; attempts++; } while ((os == null || os.size() > byteLimit) && attempts < NUMBER_OF_RESIZE_ATTEMPTS); return os == null ? null : os.toByteArray(); } catch (FileNotFoundException e) { Log.e(TAG, e.getMessage(), e); return null; } catch (java.lang.OutOfMemoryError e) { Log.e(TAG, e.getMessage(), e); return null; } }"
Inversion-Mutation
megadiff
"@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.my_tag_activity); if (savedInstanceState != null) { mTagIdInEdit = savedInstanceState.getLong(BUNDLE_KEY_TAG_ID_IN_EDIT, -1); } // Set up the check box to toggle My tag sharing. mEnabled = (CheckBox) findViewById(R.id.toggle_enabled_checkbox); mEnabled.setChecked(false); // Set after initial data load completes. findViewById(R.id.toggle_enabled_target).setOnClickListener(this); // Setup the active tag selector. mActiveTagDetails = findViewById(R.id.active_tag_details); mSelectActiveTagAnchor = findViewById(R.id.choose_my_tag); findViewById(R.id.active_tag).setOnClickListener(this); updateActiveTagView(null); // Filled in after initial data load. mActiveTagId = getPreferences(Context.MODE_PRIVATE).getLong(PREF_KEY_ACTIVE_TAG, -1); // Setup the list. mAdapter = new TagAdapter(this); mList = (ListView) findViewById(android.R.id.list); mList.setAdapter(mAdapter); mList.setOnItemClickListener(this); findViewById(R.id.add_tag).setOnClickListener(this); // Don't setup the empty view until after the first load // so the empty text doesn't flash when first loading the // activity. mList.setEmptyView(null); // Kick off an async task to load the tags. new TagLoaderTask().execute((Void[]) null); // If we're not on a user build offer a back door for writing tags. // The UX is horrible so we don't want to ship it but need it for testing. if (!Build.TYPE.equalsIgnoreCase("user")) { mWriteSupport = true; } registerForContextMenu(mList); if (getIntent().hasExtra(EditTagActivity.EXTRA_RESULT_MSG)) { NdefMessage msg = (NdefMessage) Preconditions.checkNotNull( getIntent().getParcelableExtra(EditTagActivity.EXTRA_RESULT_MSG)); saveNewMessage(msg); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate"
"@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.my_tag_activity); if (savedInstanceState != null) { mTagIdInEdit = savedInstanceState.getLong(BUNDLE_KEY_TAG_ID_IN_EDIT, -1); } // Set up the check box to toggle My tag sharing. mEnabled = (CheckBox) findViewById(R.id.toggle_enabled_checkbox); mEnabled.setChecked(false); // Set after initial data load completes. findViewById(R.id.toggle_enabled_target).setOnClickListener(this); // Setup the active tag selector. mActiveTagDetails = findViewById(R.id.active_tag_details); mSelectActiveTagAnchor = findViewById(R.id.choose_my_tag); findViewById(R.id.active_tag).setOnClickListener(this); updateActiveTagView(null); // Filled in after initial data load. mActiveTagId = getPreferences(Context.MODE_PRIVATE).getLong(PREF_KEY_ACTIVE_TAG, -1); // Setup the list. mAdapter = new TagAdapter(this); mList = (ListView) findViewById(android.R.id.list); mList.setAdapter(mAdapter); mList.setOnItemClickListener(this); findViewById(R.id.add_tag).setOnClickListener(this); // Don't setup the empty view until after the first load // so the empty text doesn't flash when first loading the // activity. mList.setEmptyView(null); // Kick off an async task to load the tags. new TagLoaderTask().execute((Void[]) null); // If we're not on a user build offer a back door for writing tags. // The UX is horrible so we don't want to ship it but need it for testing. if (!Build.TYPE.equalsIgnoreCase("user")) { mWriteSupport = true; <MASK>registerForContextMenu(mList);</MASK> } if (getIntent().hasExtra(EditTagActivity.EXTRA_RESULT_MSG)) { NdefMessage msg = (NdefMessage) Preconditions.checkNotNull( getIntent().getParcelableExtra(EditTagActivity.EXTRA_RESULT_MSG)); saveNewMessage(msg); } }"
Inversion-Mutation
megadiff
"public void close(){ IStreamService streamService = (IStreamService) getScopeService(scope, IStreamService.STREAM_SERVICE, StreamService.class); if (streamService != null) { synchronized (streams) { for(int i=0; i<streams.length; i++){ IClientStream stream = streams[i]; if(stream != null) { log.debug("Closing stream: "+ stream.getStreamId()); streamService.deleteStream(this, stream.getStreamId()); streams[i] = null; } } } } IFlowControlService fcs = (IFlowControlService) getScope().getContext().getBean( IFlowControlService.KEY); fcs.unregisterFlowControllable(this); super.close(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "close"
"public void close(){ IStreamService streamService = (IStreamService) getScopeService(scope, IStreamService.STREAM_SERVICE, StreamService.class); if (streamService != null) { synchronized (streams) { for(int i=0; i<streams.length; i++){ IClientStream stream = streams[i]; if(stream != null) { log.debug("Closing stream: "+ stream.getStreamId()); streamService.deleteStream(this, stream.getStreamId()); streams[i] = null; } } } } <MASK>super.close();</MASK> IFlowControlService fcs = (IFlowControlService) getScope().getContext().getBean( IFlowControlService.KEY); fcs.unregisterFlowControllable(this); }"
Inversion-Mutation
megadiff
"public String generate(Object argument) { final StringBuffer stringBuffer = new StringBuffer(); /** * <copyright> * * Copyright (c) 2002-2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM - Initial API and implementation * * </copyright> */ final GenClass genClass = (GenClass)((Object[])argument)[0]; final GenPackage genPackage = genClass.getGenPackage(); final GenModel genModel=genPackage.getGenModel(); final boolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); final boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]); final String publicStaticFinalFlag = isImplementation ? "public static final " : ""; final String singleWildcard = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50 ? "<?>" : ""; final String negativeOffsetCorrection = genClass.hasOffsetCorrection() ? " - " + genClass.getOffsetCorrectionField(null) : ""; final String positiveOffsetCorrection = genClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(null) : ""; stringBuffer.append(TEXT_1); stringBuffer.append(TEXT_2); {GenBase copyrightHolder = argument instanceof GenBase ? (GenBase)argument : argument instanceof Object[] && ((Object[])argument)[0] instanceof GenBase ? (GenBase)((Object[])argument)[0] : null; if (copyrightHolder != null && copyrightHolder.hasCopyright()) { stringBuffer.append(TEXT_3); stringBuffer.append(copyrightHolder.getCopyright(copyrightHolder.getGenModel().getIndentation(stringBuffer))); } else { stringBuffer.append(TEXT_4); }} stringBuffer.append(TEXT_5); stringBuffer.append("$"); stringBuffer.append(TEXT_6); stringBuffer.append("$"); stringBuffer.append(TEXT_7); if (isInterface) { stringBuffer.append(TEXT_8); stringBuffer.append(genPackage.getInterfacePackageName()); stringBuffer.append(TEXT_9); } else { stringBuffer.append(TEXT_10); stringBuffer.append(genPackage.getClassPackageName()); stringBuffer.append(TEXT_11); } stringBuffer.append(TEXT_12); genModel.markImportLocation(stringBuffer, genPackage); stringBuffer.append(TEXT_13); if (isInterface) { stringBuffer.append(TEXT_14); stringBuffer.append(genClass.getFormattedName()); stringBuffer.append(TEXT_15); if (genClass.hasDocumentation()) { stringBuffer.append(TEXT_16); stringBuffer.append(genClass.getDocumentation(genModel.getIndentation(stringBuffer))); stringBuffer.append(TEXT_17); } stringBuffer.append(TEXT_18); if (!genClass.getGenFeatures().isEmpty()) { stringBuffer.append(TEXT_19); for (GenFeature genFeature : genClass.getGenFeatures()) { if (!genFeature.isSuppressedGetVisibility()) { stringBuffer.append(TEXT_20); stringBuffer.append(genClass.getQualifiedInterfaceName()); stringBuffer.append(TEXT_21); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_22); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_23); } } stringBuffer.append(TEXT_24); } stringBuffer.append(TEXT_25); if (!genModel.isSuppressEMFMetaData()) { stringBuffer.append(TEXT_26); stringBuffer.append(genPackage.getQualifiedPackageInterfaceName()); stringBuffer.append(TEXT_27); stringBuffer.append(genClass.getClassifierAccessorName()); stringBuffer.append(TEXT_28); } if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genClass.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false; stringBuffer.append(TEXT_29); stringBuffer.append(modelInfo); } else { stringBuffer.append(TEXT_30); stringBuffer.append(modelInfo); }} if (first) { stringBuffer.append(TEXT_31); }} if (genClass.needsRootExtendsInterfaceExtendsTag()) { stringBuffer.append(TEXT_32); stringBuffer.append(genModel.getImportedName(genModel.getRootExtendsInterface())); } stringBuffer.append(TEXT_33); } else { stringBuffer.append(TEXT_34); stringBuffer.append(genClass.getFormattedName()); stringBuffer.append(TEXT_35); if (!genClass.getImplementedGenFeatures().isEmpty()) { stringBuffer.append(TEXT_36); for (GenFeature genFeature : genClass.getImplementedGenFeatures()) { stringBuffer.append(TEXT_37); stringBuffer.append(genClass.getQualifiedClassName()); stringBuffer.append(TEXT_38); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_39); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_40); } stringBuffer.append(TEXT_41); } stringBuffer.append(TEXT_42); } if (isImplementation) { stringBuffer.append(TEXT_43); if (genClass.isAbstract()) { stringBuffer.append(TEXT_44); } stringBuffer.append(TEXT_45); stringBuffer.append(genClass.getClassName()); stringBuffer.append(genClass.getTypeParameters().trim()); stringBuffer.append(genClass.getClassExtends()); stringBuffer.append(genClass.getClassImplements()); } else { stringBuffer.append(TEXT_46); stringBuffer.append(genClass.getInterfaceName()); stringBuffer.append(genClass.getTypeParameters().trim()); stringBuffer.append(genClass.getInterfaceExtends()); } stringBuffer.append(TEXT_47); if (genModel.hasCopyrightField()) { stringBuffer.append(TEXT_48); stringBuffer.append(publicStaticFinalFlag); stringBuffer.append(genModel.getImportedName("java.lang.String")); stringBuffer.append(TEXT_49); stringBuffer.append(genModel.getCopyrightFieldLiteral()); stringBuffer.append(TEXT_50); stringBuffer.append(genModel.getNonNLS()); stringBuffer.append(TEXT_51); } if (isImplementation && genModel.getDriverNumber() != null) { stringBuffer.append(TEXT_52); stringBuffer.append(genModel.getImportedName("java.lang.String")); stringBuffer.append(TEXT_53); stringBuffer.append(genModel.getDriverNumber()); stringBuffer.append(TEXT_54); stringBuffer.append(genModel.getNonNLS()); stringBuffer.append(TEXT_55); } if (isImplementation && genClass.isJavaIOSerializable()) { stringBuffer.append(TEXT_56); } if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField(); if (eVirtualValuesField != null) { stringBuffer.append(TEXT_57); stringBuffer.append(eVirtualValuesField); stringBuffer.append(TEXT_58); } { List<String> eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList<String>()); if (!eVirtualIndexBitFields.isEmpty()) { for (String eVirtualIndexBitField : eVirtualIndexBitFields) { stringBuffer.append(TEXT_59); stringBuffer.append(eVirtualIndexBitField); stringBuffer.append(TEXT_60); } } } } if (isImplementation && genClass.isModelRoot() && genModel.isBooleanFlagsEnabled() && genModel.getBooleanFlagsReservedBits() == -1) { stringBuffer.append(TEXT_61); stringBuffer.append(genModel.getBooleanFlagsField()); stringBuffer.append(TEXT_62); } if (isImplementation && !genModel.isReflectiveDelegation()) { for (GenFeature genFeature : genClass.getDeclaredFieldGenFeatures()) { if (genFeature.isListType() || genFeature.isReferenceType()) { if (genClass.isField(genFeature)) { stringBuffer.append(TEXT_63); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_64); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_65); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_66); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_67); stringBuffer.append(genFeature.getImportedInternalType(genClass)); stringBuffer.append(TEXT_68); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_69); } if (genModel.isArrayAccessors() && genFeature.isListType() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) { String rawListItemType = genFeature.getRawListItemType(); int index = rawListItemType.indexOf('['); String head = rawListItemType; String tail = ""; if (index != -1) { head = rawListItemType.substring(0, index); tail = rawListItemType.substring(index); } stringBuffer.append(TEXT_70); stringBuffer.append(genFeature.getGetArrayAccessor()); stringBuffer.append(TEXT_71); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_72); stringBuffer.append(genFeature.getGetArrayAccessor()); stringBuffer.append(TEXT_73); if (genFeature.getQualifiedListItemType(genClass).contains("<")) { stringBuffer.append(TEXT_74); } stringBuffer.append(TEXT_75); stringBuffer.append(rawListItemType); stringBuffer.append(TEXT_76); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_77); stringBuffer.append(head); stringBuffer.append(TEXT_78); stringBuffer.append(tail); stringBuffer.append(TEXT_79); } } else { if (genFeature.hasEDefault() && (!genFeature.isVolatile() || !genModel.isReflectiveDelegation() && (!genFeature.hasDelegateFeature() || !genFeature.isUnsettable()))) { String staticDefaultValue = genFeature.getStaticDefaultValue(); stringBuffer.append(TEXT_80); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_81); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_82); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_83); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_84); if (genModel.useGenerics() && genFeature.isListDataType() && genFeature.isSetDefaultValue()) { stringBuffer.append(TEXT_85); } stringBuffer.append(TEXT_86); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_87); stringBuffer.append(genFeature.getEDefault()); if ("".equals(staticDefaultValue)) { stringBuffer.append(TEXT_88); stringBuffer.append(genFeature.getEcoreFeature().getDefaultValueLiteral()); stringBuffer.append(TEXT_89); } else { stringBuffer.append(TEXT_90); stringBuffer.append(staticDefaultValue); stringBuffer.append(TEXT_91); stringBuffer.append(genModel.getNonNLS(staticDefaultValue)); } stringBuffer.append(TEXT_92); } if (genClass.isField(genFeature)) { if (genClass.isFlag(genFeature)) { int flagIndex = genClass.getFlagIndex(genFeature); if (flagIndex > 31 && flagIndex % 32 == 0) { stringBuffer.append(TEXT_93); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_94); } if (genFeature.isEnumType()) { stringBuffer.append(TEXT_95); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_96); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_97); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_98); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_99); stringBuffer.append(flagIndex % 32); stringBuffer.append(TEXT_100); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_101); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_102); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_103); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_104); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_105); } else { stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_106); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_107); } stringBuffer.append(TEXT_108); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_109); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_110); stringBuffer.append(genFeature.getTypeGenClassifier().getFormattedName()); stringBuffer.append(TEXT_111); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_112); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_113); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_114); } else { stringBuffer.append(TEXT_115); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_116); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_117); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_118); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_119); } stringBuffer.append(TEXT_120); } stringBuffer.append(TEXT_121); stringBuffer.append(genClass.getFlagSize(genFeature) > 1 ? "s" : ""); stringBuffer.append(TEXT_122); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_123); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_124); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_125); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_126); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_127); stringBuffer.append(genClass.getFlagMask(genFeature)); stringBuffer.append(TEXT_128); if (genFeature.isEnumType()) { stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_129); } else { stringBuffer.append(flagIndex % 32); } stringBuffer.append(TEXT_130); } else { stringBuffer.append(TEXT_131); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_132); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_133); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_134); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_135); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_136); stringBuffer.append(genFeature.getSafeName()); if (genFeature.hasEDefault()) { stringBuffer.append(TEXT_137); stringBuffer.append(genFeature.getEDefault()); } stringBuffer.append(TEXT_138); } } } if (genClass.isESetField(genFeature)) { if (genClass.isESetFlag(genFeature)) { int flagIndex = genClass.getESetFlagIndex(genFeature); if (flagIndex > 31 && flagIndex % 32 == 0) { stringBuffer.append(TEXT_139); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_140); } stringBuffer.append(TEXT_141); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_142); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_143); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_144); stringBuffer.append(flagIndex % 32 ); stringBuffer.append(TEXT_145); } else { stringBuffer.append(TEXT_146); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_147); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_148); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_149); } } //Class/declaredFieldGenFeature.override.javajetinc } } if (isImplementation && genClass.hasOffsetCorrection() && !genClass.getImplementedGenFeatures().isEmpty()) { stringBuffer.append(TEXT_150); stringBuffer.append(genClass.getOffsetCorrectionField(null)); stringBuffer.append(TEXT_151); stringBuffer.append(genClass.getQualifiedClassifierAccessor()); stringBuffer.append(TEXT_152); stringBuffer.append(genClass.getImplementedGenFeatures().get(0).getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_153); stringBuffer.append(genClass.getQualifiedFeatureID(genClass.getImplementedGenFeatures().get(0))); stringBuffer.append(TEXT_154); } if (isImplementation && genClass.hasOffsetCorrection() && !genModel.isReflectiveDelegation()) { for (GenFeature genFeature : genClass.getImplementedGenFeatures()) { GenFeature reverseFeature = genFeature.getReverse(); if (reverseFeature != null && reverseFeature.getGenClass().hasOffsetCorrection()) { stringBuffer.append(TEXT_155); stringBuffer.append(genClass.getOffsetCorrectionField(genFeature)); stringBuffer.append(TEXT_156); stringBuffer.append(reverseFeature.getGenClass().getQualifiedClassifierAccessor()); stringBuffer.append(TEXT_157); stringBuffer.append(reverseFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_158); stringBuffer.append(reverseFeature.getGenClass().getQualifiedFeatureID(reverseFeature)); stringBuffer.append(TEXT_159); } } } if (isImplementation) { stringBuffer.append(TEXT_160); if (genModel.isPublicConstructors()) { stringBuffer.append(TEXT_161); } else { stringBuffer.append(TEXT_162); } stringBuffer.append(TEXT_163); stringBuffer.append(genClass.getClassName()); stringBuffer.append(TEXT_164); for (GenFeature genFeature : genClass.getFlagGenFeaturesWithDefault()) { stringBuffer.append(TEXT_165); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_166); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_167); if (!genFeature.isBooleanType()) { stringBuffer.append(TEXT_168); } stringBuffer.append(TEXT_169); } stringBuffer.append(TEXT_170); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_171); } stringBuffer.append(TEXT_172); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EClass")); stringBuffer.append(TEXT_173); stringBuffer.append(genClass.getQualifiedClassifierAccessor()); stringBuffer.append(TEXT_174); } if (isImplementation && genModel.getFeatureDelegation() == GenDelegationKind.REFLECTIVE_LITERAL && (genClass.getClassExtendsGenClass() == null || genClass.getClassExtendsGenClass().getGenModel().getFeatureDelegation() != GenDelegationKind.REFLECTIVE_LITERAL)) { stringBuffer.append(TEXT_175); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_176); } stringBuffer.append(TEXT_177); stringBuffer.append(genClass.getClassExtendsGenClass() == null ? 0 : genClass.getClassExtendsGenClass().getAllGenFeatures().size()); stringBuffer.append(TEXT_178); } //Class/reflectiveDelegation.override.javajetinc new Runnable() { public void run() { for (GenFeature genFeature : (isImplementation ? genClass.getImplementedGenFeatures() : genClass.getDeclaredGenFeatures())) { if (genModel.isArrayAccessors() && genFeature.isListType() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) { stringBuffer.append(TEXT_179); if (!isImplementation) { stringBuffer.append(TEXT_180); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_181); stringBuffer.append(genFeature.getGetArrayAccessor()); stringBuffer.append(TEXT_182); } else { if (genModel.useGenerics()) { stringBuffer.append(TEXT_183); } stringBuffer.append(TEXT_184); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_185); stringBuffer.append(genFeature.getGetArrayAccessor()); stringBuffer.append(TEXT_186); if (genFeature.isVolatile()) { stringBuffer.append(TEXT_187); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(genFeature.getListTemplateArguments(genClass)); stringBuffer.append(TEXT_188); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(genFeature.getListTemplateArguments(genClass)); stringBuffer.append(TEXT_189); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_190); if (genModel.useGenerics() && !genFeature.getListItemType(genClass).contains("<") && !genFeature.getListItemType(null).equals(genFeature.getListItemType(genClass))) { stringBuffer.append(TEXT_191); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_192); } stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_193); } else { stringBuffer.append(TEXT_194); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_195); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_196); if (genModel.useGenerics() && !genFeature.getListItemType(genClass).contains("<") && !genFeature.getListItemType(null).equals(genFeature.getListItemType(genClass))) { stringBuffer.append(TEXT_197); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_198); } stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_199); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(genFeature.getListTemplateArguments(genClass)); stringBuffer.append(TEXT_200); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(genFeature.getListTemplateArguments(genClass)); stringBuffer.append(TEXT_201); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_202); } stringBuffer.append(TEXT_203); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_204); } stringBuffer.append(TEXT_205); if (!isImplementation) { stringBuffer.append(TEXT_206); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_207); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_208); } else { stringBuffer.append(TEXT_209); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_210); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_211); if (!genModel.useGenerics()) { stringBuffer.append(TEXT_212); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_213); } stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_214); } stringBuffer.append(TEXT_215); if (!isImplementation) { stringBuffer.append(TEXT_216); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_217); } else { stringBuffer.append(TEXT_218); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_219); if (genFeature.isVolatile()) { stringBuffer.append(TEXT_220); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_221); } else { stringBuffer.append(TEXT_222); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_223); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_224); } stringBuffer.append(TEXT_225); } stringBuffer.append(TEXT_226); if (!isImplementation) { stringBuffer.append(TEXT_227); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_228); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_229); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_230); } else { stringBuffer.append(TEXT_231); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_232); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_233); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_234); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(genFeature.getListTemplateArguments(genClass)); stringBuffer.append(TEXT_235); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_236); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_237); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_238); } stringBuffer.append(TEXT_239); if (!isImplementation) { stringBuffer.append(TEXT_240); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_241); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_242); } else { stringBuffer.append(TEXT_243); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_244); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_245); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_246); } } if (genFeature.isGet() && (isImplementation || !genFeature.isSuppressedGetVisibility())) { if (isInterface) { stringBuffer.append(TEXT_247); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_248); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_249); if (genFeature.isListType()) { if (genFeature.isMapType()) { GenFeature keyFeature = genFeature.getMapEntryTypeGenClass().getMapEntryKeyFeature(); GenFeature valueFeature = genFeature.getMapEntryTypeGenClass().getMapEntryValueFeature(); stringBuffer.append(TEXT_250); if (keyFeature.isListType()) { stringBuffer.append(TEXT_251); stringBuffer.append(keyFeature.getQualifiedListItemType(genClass)); stringBuffer.append(TEXT_252); } else { stringBuffer.append(TEXT_253); stringBuffer.append(keyFeature.getType(genClass)); stringBuffer.append(TEXT_254); } stringBuffer.append(TEXT_255); if (valueFeature.isListType()) { stringBuffer.append(TEXT_256); stringBuffer.append(valueFeature.getQualifiedListItemType(genClass)); stringBuffer.append(TEXT_257); } else { stringBuffer.append(TEXT_258); stringBuffer.append(valueFeature.getType(genClass)); stringBuffer.append(TEXT_259); } stringBuffer.append(TEXT_260); } else if (!genFeature.isWrappedFeatureMapType() && !(genModel.isSuppressEMFMetaData() && "org.eclipse.emf.ecore.EObject".equals(genFeature.getQualifiedListItemType(genClass)))) { String typeName = genFeature.getQualifiedListItemType(genClass); String head = typeName; String tail = ""; int index = typeName.indexOf('<'); if (index == -1) { index = typeName.indexOf('['); } if (index != -1) { head = typeName.substring(0, index); tail = typeName.substring(index).replaceAll("<", "&lt;"); } stringBuffer.append(TEXT_261); stringBuffer.append(head); stringBuffer.append(TEXT_262); stringBuffer.append(tail); stringBuffer.append(TEXT_263); } } else if (genFeature.isSetDefaultValue()) { stringBuffer.append(TEXT_264); stringBuffer.append(genFeature.getDefaultValue()); stringBuffer.append(TEXT_265); } if (genFeature.getTypeGenEnum() != null) { stringBuffer.append(TEXT_266); stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName()); stringBuffer.append(TEXT_267); } if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); if (!reverseGenFeature.isSuppressedGetVisibility()) { stringBuffer.append(TEXT_268); stringBuffer.append(reverseGenFeature.getGenClass().getQualifiedInterfaceName()); stringBuffer.append(TEXT_269); stringBuffer.append(reverseGenFeature.getGetAccessor()); stringBuffer.append(TEXT_270); stringBuffer.append(reverseGenFeature.getFormattedName()); stringBuffer.append(TEXT_271); } } stringBuffer.append(TEXT_272); if (!genFeature.hasDocumentation()) { stringBuffer.append(TEXT_273); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_274); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_275); } stringBuffer.append(TEXT_276); if (genFeature.hasDocumentation()) { stringBuffer.append(TEXT_277); stringBuffer.append(genFeature.getDocumentation(genModel.getIndentation(stringBuffer))); stringBuffer.append(TEXT_278); } stringBuffer.append(TEXT_279); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_280); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_281); if (genFeature.getTypeGenEnum() != null) { stringBuffer.append(TEXT_282); stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName()); } if (genFeature.isUnsettable()) { if (!genFeature.isSuppressedIsSetVisibility()) { stringBuffer.append(TEXT_283); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_284); } if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) { stringBuffer.append(TEXT_285); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_286); } } if (genFeature.isChangeable() && !genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) { stringBuffer.append(TEXT_287); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_288); stringBuffer.append(genFeature.getRawImportedBoundType()); stringBuffer.append(TEXT_289); } if (!genModel.isSuppressEMFMetaData()) { stringBuffer.append(TEXT_290); stringBuffer.append(genPackage.getQualifiedPackageInterfaceName()); stringBuffer.append(TEXT_291); stringBuffer.append(genFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_292); } if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); if (!reverseGenFeature.isSuppressedGetVisibility()) { stringBuffer.append(TEXT_293); stringBuffer.append(reverseGenFeature.getGenClass().getQualifiedInterfaceName()); stringBuffer.append(TEXT_294); stringBuffer.append(reverseGenFeature.getGetAccessor()); } } if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genFeature.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false; stringBuffer.append(TEXT_295); stringBuffer.append(modelInfo); } else { stringBuffer.append(TEXT_296); stringBuffer.append(modelInfo); }} if (first) { stringBuffer.append(TEXT_297); }} stringBuffer.append(TEXT_298); //Class/getGenFeature.javadoc.override.javajetinc } else { stringBuffer.append(TEXT_299); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/getGenFeature.annotations.insert.javajetinc } } if (!isImplementation) { stringBuffer.append(TEXT_300); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_301); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_302); } else { if (genModel.useGenerics() && ((genFeature.isContainer() || genFeature.isResolveProxies()) && !genFeature.isListType() && !genModel.isReflectiveDelegation() && genFeature.isUncheckedCast(genClass) || genFeature.isListType() && (genModel.isReflectiveDelegation() || genModel.isVirtualDelegation()) || genFeature.isListDataType() && genFeature.hasDelegateFeature())) { stringBuffer.append(TEXT_303); } stringBuffer.append(TEXT_304); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_305); stringBuffer.append(genFeature.getGetAccessor()); if (genClass.hasCollidingGetAccessorOperation(genFeature)) { stringBuffer.append(TEXT_306); } stringBuffer.append(TEXT_307); if (genModel.isReflectiveDelegation()) { stringBuffer.append(TEXT_308); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_309); } stringBuffer.append(TEXT_310); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_311); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_312); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_313); stringBuffer.append(genFeature.getPrimitiveValueFunction()); stringBuffer.append(TEXT_314); } stringBuffer.append(TEXT_315); } else if (!genFeature.isVolatile()) { if (genFeature.isListType()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_316); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_317); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_318); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_319); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_320); } stringBuffer.append(TEXT_321); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_322); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_323); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_324); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_325); stringBuffer.append(genClass.getListConstructor(genFeature)); stringBuffer.append(TEXT_326); } else { stringBuffer.append(TEXT_327); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_328); stringBuffer.append(genClass.getListConstructor(genFeature)); stringBuffer.append(TEXT_329); } stringBuffer.append(TEXT_330); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes() ? ".map()" : ""); stringBuffer.append(TEXT_331); } else if (genFeature.isContainer()) { stringBuffer.append(TEXT_332); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_333); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_334); } else { if (genFeature.isResolveProxies()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_335); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_336); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_337); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_338); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); if (genFeature.hasEDefault()) { stringBuffer.append(TEXT_339); stringBuffer.append(genFeature.getEDefault()); } stringBuffer.append(TEXT_340); } stringBuffer.append(TEXT_341); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_342); stringBuffer.append(genFeature.getSafeNameAsEObject()); stringBuffer.append(TEXT_343); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_344); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_345); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_346); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_347); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_348); stringBuffer.append(genFeature.getNonEObjectInternalTypeCast(genClass)); stringBuffer.append(TEXT_349); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_350); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_351); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_352); if (genFeature.isEffectiveContains()) { stringBuffer.append(TEXT_353); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_354); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_355); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_356); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_357); if (!genFeature.isBidirectional()) { stringBuffer.append(TEXT_358); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_359); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_360); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_361); } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_362); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_363); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_364); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_365); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_366); } stringBuffer.append(TEXT_367); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_368); if (!genFeature.isBidirectional()) { stringBuffer.append(TEXT_369); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_370); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_371); } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_372); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_373); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_374); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_375); } stringBuffer.append(TEXT_376); } else if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_377); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_378); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_379); } if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_380); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_381); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_382); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_383); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_384); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_385); } stringBuffer.append(TEXT_386); } if (!genFeature.isResolveProxies() && genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_387); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_388); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); if (genFeature.hasEDefault()) { stringBuffer.append(TEXT_389); stringBuffer.append(genFeature.getEDefault()); } stringBuffer.append(TEXT_390); } else if (genClass.isFlag(genFeature)) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_391); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_392); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_393); } else { stringBuffer.append(TEXT_394); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_395); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_396); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_397); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_398); } } else { stringBuffer.append(TEXT_399); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_400); } } } else {//volatile if (genFeature.isResolveProxies() && !genFeature.isListType()) { stringBuffer.append(TEXT_401); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_402); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_403); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_404); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_405); stringBuffer.append(genFeature.getSafeNameAsEObject()); stringBuffer.append(TEXT_406); stringBuffer.append(genFeature.getNonEObjectInternalTypeCast(genClass)); stringBuffer.append(TEXT_407); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_408); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_409); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_410); } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); if (genFeature.isFeatureMapType()) { String featureMapEntryTemplateArgument = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50 ? "<" + genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap") + ".Entry>" : ""; if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_411); stringBuffer.append(genFeature.getImportedEffectiveFeatureMapWrapperClass()); stringBuffer.append(TEXT_412); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_413); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_414); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_415); stringBuffer.append(featureMapEntryTemplateArgument); stringBuffer.append(TEXT_416); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_417); } else { stringBuffer.append(TEXT_418); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_419); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_420); stringBuffer.append(featureMapEntryTemplateArgument); stringBuffer.append(TEXT_421); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_422); } } else if (genFeature.isListType()) { if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_423); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_424); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_425); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_426); } else { stringBuffer.append(TEXT_427); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_428); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_429); } } else { if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_430); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_431); } if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType()) { stringBuffer.append(TEXT_432); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_433); } stringBuffer.append(TEXT_434); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_435); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_436); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_437); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_438); stringBuffer.append(genFeature.getPrimitiveValueFunction()); stringBuffer.append(TEXT_439); } stringBuffer.append(TEXT_440); } else { stringBuffer.append(TEXT_441); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_442); } if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType()) { stringBuffer.append(TEXT_443); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_444); } stringBuffer.append(TEXT_445); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_446); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_447); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_448); stringBuffer.append(genFeature.getPrimitiveValueFunction()); stringBuffer.append(TEXT_449); } stringBuffer.append(TEXT_450); } } } else if (genClass.getGetAccessorOperation(genFeature) != null) { stringBuffer.append(TEXT_451); stringBuffer.append(genClass.getGetAccessorOperation(genFeature).getBody(genModel.getIndentation(stringBuffer))); } else { stringBuffer.append(TEXT_452); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_453); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_454); if (genFeature.isListType()) { stringBuffer.append(TEXT_455); if (genFeature.isMapType()) { stringBuffer.append(TEXT_456); } else if (genFeature.isFeatureMapType()) { stringBuffer.append(TEXT_457); } else { stringBuffer.append(TEXT_458); } stringBuffer.append(TEXT_459); } stringBuffer.append(TEXT_460); //Class/getGenFeature.todo.override.javajetinc } } stringBuffer.append(TEXT_461); } //Class/getGenFeature.override.javajetinc } if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicGet()) { stringBuffer.append(TEXT_462); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/basicGetGenFeature.annotations.insert.javajetinc } stringBuffer.append(TEXT_463); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_464); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_465); if (genFeature.isContainer()) { stringBuffer.append(TEXT_466); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_467); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_468); } else if (!genFeature.isVolatile()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_469); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_470); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_471); } else { stringBuffer.append(TEXT_472); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_473); } } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_474); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_475); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_476); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_477); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_478); } else { stringBuffer.append(TEXT_479); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_480); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_481); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_482); } } else { stringBuffer.append(TEXT_483); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_484); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_485); //Class/basicGetGenFeature.todo.override.javajetinc } stringBuffer.append(TEXT_486); //Class/basicGetGenFeature.override.javajetinc } if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicSet()) { stringBuffer.append(TEXT_487); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/basicSetGenFeature.annotations.insert.javajetinc } stringBuffer.append(TEXT_488); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_489); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_490); stringBuffer.append(genFeature.getImportedInternalType(genClass)); stringBuffer.append(TEXT_491); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_492); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_493); if (genFeature.isContainer()) { stringBuffer.append(TEXT_494); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_495); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_496); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_497); stringBuffer.append(TEXT_498); } else if (!genFeature.isVolatile()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_499); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_500); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_501); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_502); } else { stringBuffer.append(TEXT_503); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_504); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_505); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_506); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_507); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_508); } if (genFeature.isUnsettable()) { if (genModel.isVirtualDelegation()) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_509); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_510); } } else if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_511); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_512); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_513); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_514); if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_515); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_516); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_517); } } else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_518); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_519); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_520); } stringBuffer.append(TEXT_521); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_522); } } if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_523); if (genFeature.isUnsettable()) { stringBuffer.append(TEXT_524); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_525); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_526); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_527); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_528); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_529); stringBuffer.append(genFeature.getCapName()); } else { stringBuffer.append(TEXT_530); stringBuffer.append(genFeature.getCapName()); } stringBuffer.append(TEXT_531); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_532); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_533); } else { stringBuffer.append(TEXT_534); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_535); } stringBuffer.append(TEXT_536); } else { stringBuffer.append(TEXT_537); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_538); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_539); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_540); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_541); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_542); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_543); stringBuffer.append(genFeature.getCapName()); } else { stringBuffer.append(TEXT_544); stringBuffer.append(genFeature.getCapName()); } stringBuffer.append(TEXT_545); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_546); } stringBuffer.append(TEXT_547); } stringBuffer.append(TEXT_548); } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_549); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_550); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_551); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_552); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_553); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_554); } else { stringBuffer.append(TEXT_555); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_556); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_557); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_558); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_559); } } else { stringBuffer.append(TEXT_560); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_561); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_562); //Class/basicSetGenFeature.todo.override.javajetinc } stringBuffer.append(TEXT_563); //Class/basicSetGenFeature.override.javajetinc } if (genFeature.isSet() && (isImplementation || !genFeature.isSuppressedSetVisibility())) { if (isInterface) { stringBuffer.append(TEXT_564); stringBuffer.append(genClass.getQualifiedInterfaceName()); stringBuffer.append(TEXT_565); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_566); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_567); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_568); stringBuffer.append(TEXT_569); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_570); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_571); if (genFeature.isEnumType()) { stringBuffer.append(TEXT_572); stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName()); } if (genFeature.isUnsettable()) { if (!genFeature.isSuppressedIsSetVisibility()) { stringBuffer.append(TEXT_573); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_574); } if (!genFeature.isSuppressedUnsetVisibility()) { stringBuffer.append(TEXT_575); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_576); } } stringBuffer.append(TEXT_577); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_578); //Class/setGenFeature.javadoc.override.javajetinc } else { stringBuffer.append(TEXT_579); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/setGenFeature.annotations.insert.javajetinc } } if (!isImplementation) { stringBuffer.append(TEXT_580); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_581); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_582); } else { GenOperation setAccessorOperation = genClass.getSetAccessorOperation(genFeature); stringBuffer.append(TEXT_583); stringBuffer.append(genFeature.getAccessorName()); if (genClass.hasCollidingSetAccessorOperation(genFeature)) { stringBuffer.append(TEXT_584); } stringBuffer.append(TEXT_585); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_586); stringBuffer.append(setAccessorOperation == null ? "new" + genFeature.getCapName() : setAccessorOperation.getGenParameters().get(0).getName()); stringBuffer.append(TEXT_587); if (genModel.isReflectiveDelegation()) { stringBuffer.append(TEXT_588); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_589); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_590); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_591); } stringBuffer.append(TEXT_592); stringBuffer.append(genFeature.getCapName()); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_593); } stringBuffer.append(TEXT_594); } else if (!genFeature.isVolatile()) { if (genFeature.isContainer()) { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_595); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_596); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_597); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_598); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EcoreUtil")); stringBuffer.append(TEXT_599); stringBuffer.append(genFeature.getEObjectCast()); stringBuffer.append(TEXT_600); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_601); stringBuffer.append(genModel.getImportedName("java.lang.IllegalArgumentException")); stringBuffer.append(TEXT_602); stringBuffer.append(genModel.getNonNLS()); stringBuffer.append(TEXT_603); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_604); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_605); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_606); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_607); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_608); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_609); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_610); stringBuffer.append(genFeature.getInternalTypeCast()); stringBuffer.append(TEXT_611); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_612); if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_613); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_614); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_615); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_616); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_617); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_618); } } else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_619); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_620); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_621); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_622); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_623); } stringBuffer.append(TEXT_624); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_625); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_626); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_627); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_628); if (!genFeature.isBidirectional()) { stringBuffer.append(TEXT_629); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_630); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_631); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_632); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_633); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_634); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_635); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_636); } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_637); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_638); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_639); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_640); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_641); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_642); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_643); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_644); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_645); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_646); } stringBuffer.append(TEXT_647); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_648); stringBuffer.append(genFeature.getInternalTypeCast()); stringBuffer.append(TEXT_649); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_650); if (genFeature.isUnsettable()) { stringBuffer.append(TEXT_651); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_652); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_653); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_654); } else if (genClass.isESetFlag(genFeature)) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_655); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_656); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_657); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_658); } stringBuffer.append(TEXT_659); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_660); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_661); } else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_662); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_663); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_664); } stringBuffer.append(TEXT_665); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_666); } if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_667); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_668); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_669); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_670); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_671); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_672); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_673); } stringBuffer.append(TEXT_674); } else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_675); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_676); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_677); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_678); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_679); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_680); } } } else { if (genClass.isFlag(genFeature)) { if (!genModel.isSuppressNotification()) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_681); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_682); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_683); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_684); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_685); } else { stringBuffer.append(TEXT_686); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_687); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_688); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_689); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_690); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_691); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_692); } } if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_693); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_694); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_695); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_696); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_697); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_698); } else { stringBuffer.append(TEXT_699); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_700); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_701); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_702); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_703); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_704); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_705); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { stringBuffer.append(TEXT_706); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_707); } else { stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_708); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_709); } stringBuffer.append(TEXT_710); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_711); } } else { if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_712); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_713); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_714); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_715); } } if (genFeature.isEnumType()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_716); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_717); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_718); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_719); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_720); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_721); } else { stringBuffer.append(TEXT_722); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_723); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_724); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_725); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_726); } } else { if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_727); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_728); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_729); stringBuffer.append(genFeature.getInternalTypeCast()); stringBuffer.append(TEXT_730); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_731); } else { stringBuffer.append(TEXT_732); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_733); stringBuffer.append(genFeature.getInternalTypeCast()); stringBuffer.append(TEXT_734); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_735); } } if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_736); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_737); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_738); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_739); } } if (genFeature.isUnsettable()) { if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_740); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_741); } else if (genClass.isESetFlag(genFeature)) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_742); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_743); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_744); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_745); } stringBuffer.append(TEXT_746); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_747); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_748); } else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_749); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_750); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_751); } stringBuffer.append(TEXT_752); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_753); } if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_754); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_755); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_756); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_757); if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_758); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_759); stringBuffer.append(genFeature.getCapName()); } else { stringBuffer.append(TEXT_760); stringBuffer.append(genFeature.getCapName()); } stringBuffer.append(TEXT_761); if (genClass.isFlag(genFeature)) { stringBuffer.append(TEXT_762); stringBuffer.append(genFeature.getCapName()); } else { stringBuffer.append(genFeature.getSafeName()); } stringBuffer.append(TEXT_763); if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_764); } else { stringBuffer.append(TEXT_765); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_766); } stringBuffer.append(TEXT_767); } } else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_768); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_769); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_770); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_771); if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_772); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_773); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_774); stringBuffer.append(genFeature.getCapName()); } else { stringBuffer.append(TEXT_775); stringBuffer.append(genFeature.getCapName()); } stringBuffer.append(TEXT_776); if (genClass.isFlag(genFeature)) { stringBuffer.append(TEXT_777); stringBuffer.append(genFeature.getCapName()); } else { stringBuffer.append(genFeature.getSafeName()); } stringBuffer.append(TEXT_778); } } } } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_779); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_780); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_781); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_782); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_783); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_784); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_785); } stringBuffer.append(TEXT_786); stringBuffer.append(genFeature.getCapName()); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_787); } stringBuffer.append(TEXT_788); } else { stringBuffer.append(TEXT_789); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_790); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_791); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_792); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_793); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_794); } stringBuffer.append(TEXT_795); stringBuffer.append(genFeature.getCapName()); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_796); } stringBuffer.append(TEXT_797); } } else if (setAccessorOperation != null) { stringBuffer.append(TEXT_798); stringBuffer.append(setAccessorOperation.getBody(genModel.getIndentation(stringBuffer))); } else { stringBuffer.append(TEXT_799); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_800); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_801); //Class/setGenFeature.todo.override.javajetinc } stringBuffer.append(TEXT_802); } //Class/setGenFeature.override.javajetinc } if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicUnset()) { stringBuffer.append(TEXT_803); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/basicUnsetGenFeature.annotations.insert.javajetinc } stringBuffer.append(TEXT_804); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_805); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_806); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_807); if (!genFeature.isVolatile()) { if (genModel.isVirtualDelegation()) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_808); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_809); } stringBuffer.append(TEXT_810); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_811); } else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_812); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_813); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_814); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_815); } stringBuffer.append(TEXT_816); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_817); } if (genModel.isVirtualDelegation()) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_818); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_819); } } else if (genClass.isESetFlag(genFeature)) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_820); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_821); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_822); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_823); } stringBuffer.append(TEXT_824); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_825); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_826); } else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_827); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_828); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_829); } stringBuffer.append(TEXT_830); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_831); } if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_832); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_833); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_834); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_835); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_836); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_837); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_838); } else { stringBuffer.append(TEXT_839); stringBuffer.append(genFeature.getCapName()); } stringBuffer.append(TEXT_840); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_841); } else { stringBuffer.append(TEXT_842); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_843); } stringBuffer.append(TEXT_844); } } else { stringBuffer.append(TEXT_845); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_846); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_847); //Class/basicUnsetGenFeature.todo.override.javajetinc } stringBuffer.append(TEXT_848); //Class.basicUnsetGenFeature.override.javajetinc } if (genFeature.isUnset() && (isImplementation || !genFeature.isSuppressedUnsetVisibility())) { if (isInterface) { stringBuffer.append(TEXT_849); stringBuffer.append(genClass.getQualifiedInterfaceName()); stringBuffer.append(TEXT_850); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_851); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_852); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_853); stringBuffer.append(TEXT_854); if (!genFeature.isSuppressedIsSetVisibility()) { stringBuffer.append(TEXT_855); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_856); } stringBuffer.append(TEXT_857); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_858); if (!genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) { stringBuffer.append(TEXT_859); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_860); stringBuffer.append(genFeature.getRawImportedBoundType()); stringBuffer.append(TEXT_861); } stringBuffer.append(TEXT_862); //Class/unsetGenFeature.javadoc.override.javajetinc } else { stringBuffer.append(TEXT_863); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/unsetGenFeature.annotations.insert.javajetinc } } if (!isImplementation) { stringBuffer.append(TEXT_864); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_865); } else { stringBuffer.append(TEXT_866); stringBuffer.append(genFeature.getAccessorName()); if (genClass.hasCollidingUnsetAccessorOperation(genFeature)) { stringBuffer.append(TEXT_867); } stringBuffer.append(TEXT_868); if (genModel.isReflectiveDelegation()) { stringBuffer.append(TEXT_869); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_870); } else if (!genFeature.isVolatile()) { if (genFeature.isListType()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_871); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_872); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_873); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_874); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_875); } stringBuffer.append(TEXT_876); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_877); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); stringBuffer.append(TEXT_878); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_879); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_880); } else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_881); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_882); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_883); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_884); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_885); } stringBuffer.append(TEXT_886); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_887); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_888); if (!genFeature.isBidirectional()) { stringBuffer.append(TEXT_889); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_890); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_891); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_892); } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_893); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_894); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_895); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_896); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_897); } stringBuffer.append(TEXT_898); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_899); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_900); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_901); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_902); } else if (genClass.isESetFlag(genFeature)) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_903); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_904); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_905); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_906); } stringBuffer.append(TEXT_907); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_908); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_909); } else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_910); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_911); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_912); } stringBuffer.append(TEXT_913); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_914); } if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_915); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_916); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_917); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_918); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_919); } stringBuffer.append(TEXT_920); } else { if (genClass.isFlag(genFeature)) { if (!genModel.isSuppressNotification()) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_921); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_922); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_923); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_924); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_925); } else { stringBuffer.append(TEXT_926); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_927); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_928); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_929); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_930); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_931); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_932); } } } else if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_933); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_934); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_935); } else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_936); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_937); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_938); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_939); } } if (!genModel.isSuppressNotification()) { if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_940); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_941); } else if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_942); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_943); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_944); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_945); } else { stringBuffer.append(TEXT_946); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_947); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_948); } } if (genFeature.isReferenceType()) { stringBuffer.append(TEXT_949); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_950); if (!genModel.isVirtualDelegation()) { if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_951); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_952); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_953); } else { stringBuffer.append(TEXT_954); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_955); } } if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_956); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_957); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_958); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_959); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_960); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_961); } else { stringBuffer.append(TEXT_962); stringBuffer.append(genFeature.getCapName()); } stringBuffer.append(TEXT_963); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_964); } else { stringBuffer.append(TEXT_965); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_966); } stringBuffer.append(TEXT_967); } } else { if (genClass.isFlag(genFeature)) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_968); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_969); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_970); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_971); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_972); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_973); } else { stringBuffer.append(TEXT_974); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_975); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_976); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_977); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_978); } } else if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_979); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_980); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_981); } if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) { if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_982); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_983); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_984); } else { stringBuffer.append(TEXT_985); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_986); } } if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_987); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_988); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_989); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_990); if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_991); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_992); stringBuffer.append(genFeature.getEDefault()); } else { stringBuffer.append(TEXT_993); stringBuffer.append(genFeature.getCapName()); } stringBuffer.append(TEXT_994); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_995); if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_996); } else { stringBuffer.append(TEXT_997); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_998); } stringBuffer.append(TEXT_999); } } } } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_1000); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1001); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1002); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_1003); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_1004); } else { stringBuffer.append(TEXT_1005); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1006); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_1007); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_1008); } } else if (genClass.getUnsetAccessorOperation(genFeature) != null) { stringBuffer.append(TEXT_1009); stringBuffer.append(genClass.getUnsetAccessorOperation(genFeature).getBody(genModel.getIndentation(stringBuffer))); } else { stringBuffer.append(TEXT_1010); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_1011); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_1012); //Class/unsetGenFeature.todo.override.javajetinc } stringBuffer.append(TEXT_1013); } //Class/unsetGenFeature.override.javajetinc } if (genFeature.isIsSet() && (isImplementation || !genFeature.isSuppressedIsSetVisibility())) { if (isInterface) { stringBuffer.append(TEXT_1014); stringBuffer.append(genClass.getQualifiedInterfaceName()); stringBuffer.append(TEXT_1015); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1016); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_1017); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_1018); stringBuffer.append(TEXT_1019); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_1020); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_1021); if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) { stringBuffer.append(TEXT_1022); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1023); } stringBuffer.append(TEXT_1024); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1025); if (!genFeature.isListType() && genFeature.isChangeable() && !genFeature.isSuppressedSetVisibility()) { stringBuffer.append(TEXT_1026); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1027); stringBuffer.append(genFeature.getRawImportedBoundType()); stringBuffer.append(TEXT_1028); } stringBuffer.append(TEXT_1029); //Class/isSetGenFeature.javadoc.override.javajetinc } else { stringBuffer.append(TEXT_1030); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/isSetGenFeature.annotations.insert.javajetinc } } if (!isImplementation) { stringBuffer.append(TEXT_1031); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1032); } else { stringBuffer.append(TEXT_1033); stringBuffer.append(genFeature.getAccessorName()); if (genClass.hasCollidingIsSetAccessorOperation(genFeature)) { stringBuffer.append(TEXT_1034); } stringBuffer.append(TEXT_1035); if (genModel.isReflectiveDelegation()) { stringBuffer.append(TEXT_1036); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_1037); } else if (!genFeature.isVolatile()) { if (genFeature.isListType()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_1038); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1039); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1040); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1041); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1042); } stringBuffer.append(TEXT_1043); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1044); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); stringBuffer.append(TEXT_1045); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_1046); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1047); } else { if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1048); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1049); } else if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_1050); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_1051); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1052); } else { stringBuffer.append(TEXT_1053); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_1054); } } } else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_1055); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1056); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1057); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_1058); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_1059); } else { stringBuffer.append(TEXT_1060); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1061); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_1062); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_1063); } } else if (genClass.getIsSetAccessorOperation(genFeature) != null) { stringBuffer.append(TEXT_1064); stringBuffer.append(genClass.getIsSetAccessorOperation(genFeature).getBody(genModel.getIndentation(stringBuffer))); } else { stringBuffer.append(TEXT_1065); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_1066); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_1067); //Class/isSetGenFeature.todo.override.javajetinc } stringBuffer.append(TEXT_1068); } //Class/isSetGenFeature.override.javajetinc } //Class/genFeature.override.javajetinc }//for }}.run(); for (GenOperation genOperation : (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations())) { if (isInterface) { stringBuffer.append(TEXT_1069); stringBuffer.append(TEXT_1070); if (genOperation.hasDocumentation() || genOperation.hasParameterDocumentation()) { stringBuffer.append(TEXT_1071); if (genOperation.hasDocumentation()) { stringBuffer.append(TEXT_1072); stringBuffer.append(genOperation.getDocumentation(genModel.getIndentation(stringBuffer))); } for (GenParameter genParameter : genOperation.getGenParameters()) { if (genParameter.hasDocumentation()) { String documentation = genParameter.getDocumentation(""); if (documentation.contains("\n") || documentation.contains("\r")) { stringBuffer.append(TEXT_1073); stringBuffer.append(genParameter.getName()); stringBuffer.append(TEXT_1074); stringBuffer.append(genParameter.getDocumentation(genModel.getIndentation(stringBuffer))); } else { stringBuffer.append(TEXT_1075); stringBuffer.append(genParameter.getName()); stringBuffer.append(TEXT_1076); stringBuffer.append(genParameter.getDocumentation(genModel.getIndentation(stringBuffer))); } } } stringBuffer.append(TEXT_1077); } if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genOperation.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false; stringBuffer.append(TEXT_1078); stringBuffer.append(modelInfo); } else { stringBuffer.append(TEXT_1079); stringBuffer.append(modelInfo); }} if (first) { stringBuffer.append(TEXT_1080); }} stringBuffer.append(TEXT_1081); //Class/genOperation.javadoc.override.javajetinc } else { stringBuffer.append(TEXT_1082); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/genOperation.annotations.insert.javajetinc } } if (!isImplementation) { stringBuffer.append(TEXT_1083); stringBuffer.append(genOperation.getTypeParameters(genClass)); stringBuffer.append(genOperation.getImportedType(genClass)); stringBuffer.append(TEXT_1084); stringBuffer.append(genOperation.getName()); stringBuffer.append(TEXT_1085); stringBuffer.append(genOperation.getParameters(genClass)); stringBuffer.append(TEXT_1086); stringBuffer.append(genOperation.getThrows(genClass)); stringBuffer.append(TEXT_1087); } else { stringBuffer.append(TEXT_1088); stringBuffer.append(genOperation.getTypeParameters(genClass)); stringBuffer.append(genOperation.getImportedType(genClass)); stringBuffer.append(TEXT_1089); stringBuffer.append(genOperation.getName()); stringBuffer.append(TEXT_1090); stringBuffer.append(genOperation.getParameters(genClass)); stringBuffer.append(TEXT_1091); stringBuffer.append(genOperation.getThrows(genClass)); stringBuffer.append(TEXT_1092); if (genOperation.hasBody()) { stringBuffer.append(TEXT_1093); stringBuffer.append(genOperation.getBody(genModel.getIndentation(stringBuffer))); } else if (genOperation.isInvariant()) {GenClass opClass = genOperation.getGenClass(); String diagnostics = genOperation.getGenParameters().get(0).getName(); String context = genOperation.getGenParameters().get(1).getName(); stringBuffer.append(TEXT_1094); stringBuffer.append(diagnostics); stringBuffer.append(TEXT_1095); stringBuffer.append(diagnostics); stringBuffer.append(TEXT_1096); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")); stringBuffer.append(TEXT_1097); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")); stringBuffer.append(TEXT_1098); stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName()); stringBuffer.append(TEXT_1099); stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName()); stringBuffer.append(TEXT_1100); stringBuffer.append(opClass.getOperationID(genOperation)); stringBuffer.append(TEXT_1101); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")); stringBuffer.append(TEXT_1102); stringBuffer.append(genOperation.getName()); stringBuffer.append(TEXT_1103); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator")); stringBuffer.append(TEXT_1104); stringBuffer.append(context); stringBuffer.append(TEXT_1105); stringBuffer.append(genModel.getNonNLS()); stringBuffer.append(genModel.getNonNLS(2)); stringBuffer.append(TEXT_1106); } else { stringBuffer.append(TEXT_1107); //Class/implementedGenOperation.todo.override.javajetinc } stringBuffer.append(TEXT_1108); } //Class/implementedGenOperation.override.javajetinc }//for if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) { stringBuffer.append(TEXT_1109); if (genModel.useGenerics()) { for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) { if (genFeature.isUncheckedCast(genClass)) { stringBuffer.append(TEXT_1110); break; } } } if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1111); } stringBuffer.append(TEXT_1112); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_1113); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_1114); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_1115); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1116); for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) { stringBuffer.append(TEXT_1117); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1118); if (genFeature.isListType()) { String cast = "(" + genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList") + (!genModel.useGenerics() ? ")" : "<" + genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject") + ">)(" + genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList") + "<?>)"); if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) { stringBuffer.append(TEXT_1119); stringBuffer.append(cast); stringBuffer.append(TEXT_1120); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); stringBuffer.append(TEXT_1121); stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass)); stringBuffer.append(TEXT_1122); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1123); } else { stringBuffer.append(TEXT_1124); stringBuffer.append(cast); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1125); } } else if (genFeature.isContainer()) { stringBuffer.append(TEXT_1126); if (genFeature.isBasicSet()) { stringBuffer.append(TEXT_1127); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1128); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1129); } else { stringBuffer.append(TEXT_1130); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1131); } } else { if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1132); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1133); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1134); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1135); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1136); } else if (genFeature.isVolatile()) { stringBuffer.append(TEXT_1137); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1138); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1139); if (genFeature.isResolveProxies()) { stringBuffer.append(TEXT_1140); stringBuffer.append(genFeature.getAccessorName()); } else { stringBuffer.append(genFeature.getGetAccessor()); } stringBuffer.append(TEXT_1141); } stringBuffer.append(TEXT_1142); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1143); if (genFeature.isEffectiveContains()) { stringBuffer.append(TEXT_1144); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_1145); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1146); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1147); } else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_1148); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_1149); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1150); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_1151); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_1152); } stringBuffer.append(TEXT_1153); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1154); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1155); } } stringBuffer.append(TEXT_1156); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1157); } else { stringBuffer.append(TEXT_1158); } stringBuffer.append(TEXT_1159); } if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) { stringBuffer.append(TEXT_1160); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1161); } stringBuffer.append(TEXT_1162); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_1163); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_1164); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_1165); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1166); for (GenFeature genFeature : genClass.getEInverseRemoveGenFeatures()) { stringBuffer.append(TEXT_1167); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1168); if (genFeature.isListType()) { if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) { stringBuffer.append(TEXT_1169); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_1170); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); stringBuffer.append(TEXT_1171); stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass)); stringBuffer.append(TEXT_1172); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1173); } else if (genFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_1174); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_1175); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1176); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1177); } else { stringBuffer.append(TEXT_1178); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_1179); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1180); } } else if (genFeature.isContainer() && !genFeature.isBasicSet()) { stringBuffer.append(TEXT_1181); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1182); } else if (genFeature.isUnsettable()) { stringBuffer.append(TEXT_1183); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1184); } else { stringBuffer.append(TEXT_1185); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1186); } } stringBuffer.append(TEXT_1187); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1188); } else { stringBuffer.append(TEXT_1189); } stringBuffer.append(TEXT_1190); } if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) { stringBuffer.append(TEXT_1191); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1192); } stringBuffer.append(TEXT_1193); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_1194); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_1195); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1196); for (GenFeature genFeature : genClass.getEBasicRemoveFromContainerGenFeatures()) { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_1197); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1198); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_1199); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_1200); } stringBuffer.append(TEXT_1201); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1202); } else { stringBuffer.append(TEXT_1203); } stringBuffer.append(TEXT_1204); } if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEGetGenFeatures())) { stringBuffer.append(TEXT_1205); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1206); } stringBuffer.append(TEXT_1207); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1208); for (GenFeature genFeature : genClass.getEGetGenFeatures()) { stringBuffer.append(TEXT_1209); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1210); if (genFeature.isPrimitiveType()) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_1211); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1212); } else { stringBuffer.append(TEXT_1213); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_1214); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1215); } } else if (genFeature.isResolveProxies() && !genFeature.isListType()) { stringBuffer.append(TEXT_1216); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1217); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1218); } else if (genFeature.isMapType()) { if (genFeature.isEffectiveSuppressEMFTypes()) { stringBuffer.append(TEXT_1219); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); stringBuffer.append(TEXT_1220); stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass)); stringBuffer.append(TEXT_1221); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1222); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1223); } else { stringBuffer.append(TEXT_1224); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1225); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1226); } } else if (genFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_1227); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1228); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1229); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1230); } else if (genFeature.isFeatureMapType()) { stringBuffer.append(TEXT_1231); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1232); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1233); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1234); } else { stringBuffer.append(TEXT_1235); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1236); } } stringBuffer.append(TEXT_1237); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1238); } else { stringBuffer.append(TEXT_1239); } stringBuffer.append(TEXT_1240); } if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) { stringBuffer.append(TEXT_1241); if (genModel.useGenerics()) { for (GenFeature genFeature : genClass.getESetGenFeatures()) { if (genFeature.isUncheckedCast(genClass) && !genFeature.isFeatureMapType() && !genFeature.isMapType()) { stringBuffer.append(TEXT_1242); break; } } } if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1243); } stringBuffer.append(TEXT_1244); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1245); for (GenFeature genFeature : genClass.getESetGenFeatures()) { stringBuffer.append(TEXT_1246); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1247); if (genFeature.isListType()) { if (genFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_1248); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1249); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1250); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1251); } else if (genFeature.isFeatureMapType()) { stringBuffer.append(TEXT_1252); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1253); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1254); } else if (genFeature.isMapType()) { if (genFeature.isEffectiveSuppressEMFTypes()) { stringBuffer.append(TEXT_1255); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); stringBuffer.append(TEXT_1256); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); stringBuffer.append(TEXT_1257); stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass)); stringBuffer.append(TEXT_1258); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1259); } else { stringBuffer.append(TEXT_1260); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); stringBuffer.append(TEXT_1261); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1262); } } else { stringBuffer.append(TEXT_1263); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1264); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1265); stringBuffer.append(genModel.getImportedName("java.util.Collection")); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { stringBuffer.append(TEXT_1266); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_1267); } stringBuffer.append(TEXT_1268); } } else if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1269); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1270); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_1271); stringBuffer.append(genFeature.getPrimitiveValueFunction()); stringBuffer.append(TEXT_1272); } else { stringBuffer.append(TEXT_1273); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1274); if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType() || !genFeature.getRawType().equals(genFeature.getType(genClass))) { stringBuffer.append(TEXT_1275); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1276); } stringBuffer.append(TEXT_1277); } stringBuffer.append(TEXT_1278); } stringBuffer.append(TEXT_1279); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1280); } else { stringBuffer.append(TEXT_1281); } stringBuffer.append(TEXT_1282); } if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEUnsetGenFeatures())) { stringBuffer.append(TEXT_1283); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1284); } stringBuffer.append(TEXT_1285); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1286); for (GenFeature genFeature : genClass.getEUnsetGenFeatures()) { stringBuffer.append(TEXT_1287); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1288); if (genFeature.isListType() && !genFeature.isUnsettable()) { if (genFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_1289); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1290); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1291); } else { stringBuffer.append(TEXT_1292); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1293); } } else if (genFeature.isUnsettable()) { stringBuffer.append(TEXT_1294); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1295); } else if (!genFeature.hasEDefault()) { stringBuffer.append(TEXT_1296); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1297); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1298); } else { stringBuffer.append(TEXT_1299); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1300); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1301); } stringBuffer.append(TEXT_1302); } stringBuffer.append(TEXT_1303); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1304); } else { stringBuffer.append(TEXT_1305); } stringBuffer.append(TEXT_1306); //Class/eUnset.override.javajetinc } if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEIsSetGenFeatures())) { stringBuffer.append(TEXT_1307); if (genModel.useGenerics()) { for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) { if (genFeature.isListType() && !genFeature.isUnsettable() && !genFeature.isWrappedFeatureMapType() && !genClass.isField(genFeature) && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1308); break; } } } if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1309); } stringBuffer.append(TEXT_1310); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1311); for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) { stringBuffer.append(TEXT_1312); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1313); if (genFeature.isListType() && !genFeature.isUnsettable()) { if (genFeature.isWrappedFeatureMapType()) { if (genFeature.isVolatile()) { stringBuffer.append(TEXT_1314); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1315); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1316); } else { stringBuffer.append(TEXT_1317); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1318); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1319); } } else { if (genClass.isField(genFeature)) { stringBuffer.append(TEXT_1320); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1321); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1322); } else { if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1323); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1324); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1325); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1326); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1327); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1328); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1329); } else { stringBuffer.append(TEXT_1330); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1331); } } } } else if (genFeature.isUnsettable()) { stringBuffer.append(TEXT_1332); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1333); } else if (genFeature.isResolveProxies()) { if (genClass.isField(genFeature)) { stringBuffer.append(TEXT_1334); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1335); } else { if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1336); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1337); } else { stringBuffer.append(TEXT_1338); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1339); } } } else if (!genFeature.hasEDefault()) { if (genClass.isField(genFeature)) { stringBuffer.append(TEXT_1340); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1341); } else { if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1342); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1343); } else { stringBuffer.append(TEXT_1344); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1345); } } } else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) { if (genClass.isField(genFeature)) { if (genClass.isFlag(genFeature)) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_1346); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_1347); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1348); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1349); } else { stringBuffer.append(TEXT_1350); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_1351); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1352); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1353); } } else { stringBuffer.append(TEXT_1354); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1355); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1356); } } else { if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1357); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1358); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1359); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1360); } else { stringBuffer.append(TEXT_1361); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1362); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1363); } } } else {//datatype if (genClass.isField(genFeature)) { stringBuffer.append(TEXT_1364); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1365); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1366); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1367); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1368); } else { if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1369); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1370); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1371); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1372); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1373); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1374); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1375); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1376); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1377); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1378); } else { stringBuffer.append(TEXT_1379); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1380); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1381); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1382); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1383); } } } } stringBuffer.append(TEXT_1384); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1385); } else { stringBuffer.append(TEXT_1386); } stringBuffer.append(TEXT_1387); //Class/eIsSet.override.javajetinc } if (isImplementation && (!genClass.getMixinGenFeatures().isEmpty() || genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty())) { if (!genClass.getMixinGenFeatures().isEmpty()) { stringBuffer.append(TEXT_1388); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1389); } stringBuffer.append(TEXT_1390); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_1391); for (GenClass mixinGenClass : genClass.getMixinGenClasses()) { stringBuffer.append(TEXT_1392); stringBuffer.append(mixinGenClass.getImportedInterfaceName()); stringBuffer.append(TEXT_1393); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1394); for (GenFeature genFeature : mixinGenClass.getGenFeatures()) { stringBuffer.append(TEXT_1395); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1396); stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1397); } stringBuffer.append(TEXT_1398); } stringBuffer.append(TEXT_1399); } stringBuffer.append(TEXT_1400); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1401); } stringBuffer.append(TEXT_1402); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_1403); for (GenClass mixinGenClass : genClass.getMixinGenClasses()) { stringBuffer.append(TEXT_1404); stringBuffer.append(mixinGenClass.getImportedInterfaceName()); stringBuffer.append(TEXT_1405); for (GenFeature genFeature : mixinGenClass.getGenFeatures()) { stringBuffer.append(TEXT_1406); stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1407); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1408); } stringBuffer.append(TEXT_1409); } if (genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty()) { stringBuffer.append(TEXT_1410); stringBuffer.append(genClass.getImportedInterfaceName()); stringBuffer.append(TEXT_1411); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1412); for (GenFeature genFeature : genClass.getGenFeatures()) { stringBuffer.append(TEXT_1413); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1414); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1415); } stringBuffer.append(TEXT_1416); } stringBuffer.append(TEXT_1417); } if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField(); if (eVirtualValuesField != null) { stringBuffer.append(TEXT_1418); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1419); } stringBuffer.append(TEXT_1420); stringBuffer.append(eVirtualValuesField); stringBuffer.append(TEXT_1421); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1422); } stringBuffer.append(TEXT_1423); stringBuffer.append(eVirtualValuesField); stringBuffer.append(TEXT_1424); } { List<String> eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList<String>()); if (!eVirtualIndexBitFields.isEmpty()) { List<String> allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList<String>()); stringBuffer.append(TEXT_1425); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1426); } stringBuffer.append(TEXT_1427); for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) { stringBuffer.append(TEXT_1428); stringBuffer.append(i); stringBuffer.append(TEXT_1429); stringBuffer.append(allEVirtualIndexBitFields.get(i)); stringBuffer.append(TEXT_1430); } stringBuffer.append(TEXT_1431); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1432); } stringBuffer.append(TEXT_1433); for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) { stringBuffer.append(TEXT_1434); stringBuffer.append(i); stringBuffer.append(TEXT_1435); stringBuffer.append(allEVirtualIndexBitFields.get(i)); stringBuffer.append(TEXT_1436); } stringBuffer.append(TEXT_1437); } } } if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getToStringGenFeatures().isEmpty()) { stringBuffer.append(TEXT_1438); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1439); } stringBuffer.append(TEXT_1440); { boolean first = true; for (GenFeature genFeature : genClass.getToStringGenFeatures()) { if (first) { first = false; stringBuffer.append(TEXT_1441); stringBuffer.append(genFeature.getName()); stringBuffer.append(TEXT_1442); stringBuffer.append(genModel.getNonNLS()); } else { stringBuffer.append(TEXT_1443); stringBuffer.append(genFeature.getName()); stringBuffer.append(TEXT_1444); stringBuffer.append(genModel.getNonNLS()); } if (genFeature.isUnsettable() && !genFeature.isListType()) { if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1445); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1446); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1447); stringBuffer.append(genModel.getNonNLS()); } else { if (genClass.isFlag(genFeature)) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_1448); if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_1449); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_1450); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1451); } else { stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_1452); } stringBuffer.append(TEXT_1453); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_1454); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1455); stringBuffer.append(genModel.getNonNLS()); } else { stringBuffer.append(TEXT_1456); if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_1457); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_1458); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1459); } else { stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_1460); } stringBuffer.append(TEXT_1461); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1462); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_1463); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1464); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1465); stringBuffer.append(genModel.getNonNLS()); } } else { stringBuffer.append(TEXT_1466); if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_1467); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_1468); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1469); } else { stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_1470); } stringBuffer.append(TEXT_1471); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1472); stringBuffer.append(genModel.getNonNLS()); } } } else { if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1473); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); if (!genFeature.isListType() && !genFeature.isReferenceType()){ stringBuffer.append(TEXT_1474); stringBuffer.append(genFeature.getEDefault()); } stringBuffer.append(TEXT_1475); } else { if (genClass.isFlag(genFeature)) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_1476); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_1477); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1478); } else { stringBuffer.append(TEXT_1479); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1480); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_1481); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1482); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1483); } } else { stringBuffer.append(TEXT_1484); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1485); } } } } } stringBuffer.append(TEXT_1486); } if (isImplementation && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature(); String objectType = genModel.getImportedName("java.lang.Object"); String keyType = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50 ? keyFeature.getObjectType(genClass) : objectType; String valueType = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50 ? valueFeature.getObjectType(genClass) : objectType; String eMapType = genModel.getImportedName("org.eclipse.emf.common.util.EMap") + (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50 ? "<" + keyType + ", " + valueType + ">" : ""); stringBuffer.append(TEXT_1487); stringBuffer.append(objectType); stringBuffer.append(TEXT_1488); stringBuffer.append(keyType); stringBuffer.append(TEXT_1489); if (keyFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1490); stringBuffer.append(keyFeature.getObjectType(genClass)); stringBuffer.append(TEXT_1491); } else { stringBuffer.append(TEXT_1492); } stringBuffer.append(TEXT_1493); stringBuffer.append(keyType); stringBuffer.append(TEXT_1494); if (keyFeature.isListType()) { stringBuffer.append(TEXT_1495); if (!genModel.useGenerics()) { stringBuffer.append(TEXT_1496); stringBuffer.append(genModel.getImportedName("java.util.Collection")); stringBuffer.append(TEXT_1497); } stringBuffer.append(TEXT_1498); } else if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { stringBuffer.append(TEXT_1499); } else if (keyFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1500); stringBuffer.append(keyFeature.getObjectType(genClass)); stringBuffer.append(TEXT_1501); stringBuffer.append(keyFeature.getPrimitiveValueFunction()); stringBuffer.append(TEXT_1502); } else { stringBuffer.append(TEXT_1503); stringBuffer.append(keyFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1504); } stringBuffer.append(TEXT_1505); stringBuffer.append(valueType); stringBuffer.append(TEXT_1506); if (valueFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1507); stringBuffer.append(valueFeature.getObjectType(genClass)); stringBuffer.append(TEXT_1508); } else { stringBuffer.append(TEXT_1509); } stringBuffer.append(TEXT_1510); stringBuffer.append(valueType); stringBuffer.append(TEXT_1511); stringBuffer.append(valueType); stringBuffer.append(TEXT_1512); stringBuffer.append(valueType); stringBuffer.append(TEXT_1513); if (valueFeature.isListType()) { stringBuffer.append(TEXT_1514); if (!genModel.useGenerics()) { stringBuffer.append(TEXT_1515); stringBuffer.append(genModel.getImportedName("java.util.Collection")); stringBuffer.append(TEXT_1516); } stringBuffer.append(TEXT_1517); } else if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { stringBuffer.append(TEXT_1518); } else if (valueFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1519); stringBuffer.append(valueFeature.getObjectType(genClass)); stringBuffer.append(TEXT_1520); stringBuffer.append(valueFeature.getPrimitiveValueFunction()); stringBuffer.append(TEXT_1521); } else { stringBuffer.append(TEXT_1522); stringBuffer.append(valueFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1523); } stringBuffer.append(TEXT_1524); if (genModel.useGenerics()) { stringBuffer.append(TEXT_1525); } stringBuffer.append(TEXT_1526); stringBuffer.append(eMapType); stringBuffer.append(TEXT_1527); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_1528); stringBuffer.append(eMapType); stringBuffer.append(TEXT_1529); } stringBuffer.append(TEXT_1530); stringBuffer.append(isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName()); // TODO fix the space above genModel.emitSortedImports(); stringBuffer.append(TEXT_1531); return stringBuffer.toString(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "generate"
"public String generate(Object argument) { final StringBuffer stringBuffer = new StringBuffer(); /** * <copyright> * * Copyright (c) 2002-2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM - Initial API and implementation * * </copyright> */ final GenClass genClass = (GenClass)((Object[])argument)[0]; final GenPackage genPackage = genClass.getGenPackage(); final GenModel genModel=genPackage.getGenModel(); final boolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); final boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]); final String publicStaticFinalFlag = isImplementation ? "public static final " : ""; final String singleWildcard = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50 ? "<?>" : ""; final String negativeOffsetCorrection = genClass.hasOffsetCorrection() ? " - " + genClass.getOffsetCorrectionField(null) : ""; final String positiveOffsetCorrection = genClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(null) : ""; stringBuffer.append(TEXT_1); stringBuffer.append(TEXT_2); {GenBase copyrightHolder = argument instanceof GenBase ? (GenBase)argument : argument instanceof Object[] && ((Object[])argument)[0] instanceof GenBase ? (GenBase)((Object[])argument)[0] : null; if (copyrightHolder != null && copyrightHolder.hasCopyright()) { stringBuffer.append(TEXT_3); stringBuffer.append(copyrightHolder.getCopyright(copyrightHolder.getGenModel().getIndentation(stringBuffer))); <MASK>}</MASK> else { stringBuffer.append(TEXT_4); <MASK>}</MASK><MASK>}</MASK> stringBuffer.append(TEXT_5); stringBuffer.append("$"); stringBuffer.append(TEXT_6); stringBuffer.append("$"); stringBuffer.append(TEXT_7); if (isInterface) { stringBuffer.append(TEXT_8); stringBuffer.append(genPackage.getInterfacePackageName()); stringBuffer.append(TEXT_9); <MASK>}</MASK> else { stringBuffer.append(TEXT_10); stringBuffer.append(genPackage.getClassPackageName()); stringBuffer.append(TEXT_11); <MASK>}</MASK> stringBuffer.append(TEXT_12); genModel.markImportLocation(stringBuffer, genPackage); stringBuffer.append(TEXT_13); if (isInterface) { stringBuffer.append(TEXT_14); stringBuffer.append(genClass.getFormattedName()); stringBuffer.append(TEXT_15); if (genClass.hasDocumentation()) { stringBuffer.append(TEXT_16); stringBuffer.append(genClass.getDocumentation(genModel.getIndentation(stringBuffer))); stringBuffer.append(TEXT_17); <MASK>}</MASK> stringBuffer.append(TEXT_18); if (!genClass.getGenFeatures().isEmpty()) { stringBuffer.append(TEXT_19); for (GenFeature genFeature : genClass.getGenFeatures()) { if (!genFeature.isSuppressedGetVisibility()) { stringBuffer.append(TEXT_20); stringBuffer.append(genClass.getQualifiedInterfaceName()); stringBuffer.append(TEXT_21); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_22); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_23); <MASK>}</MASK> <MASK>}</MASK> stringBuffer.append(TEXT_24); <MASK>}</MASK> stringBuffer.append(TEXT_25); if (!genModel.isSuppressEMFMetaData()) { stringBuffer.append(TEXT_26); stringBuffer.append(genPackage.getQualifiedPackageInterfaceName()); stringBuffer.append(TEXT_27); stringBuffer.append(genClass.getClassifierAccessorName()); stringBuffer.append(TEXT_28); <MASK>}</MASK> if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genClass.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false; stringBuffer.append(TEXT_29); stringBuffer.append(modelInfo); <MASK>}</MASK> else { stringBuffer.append(TEXT_30); stringBuffer.append(modelInfo); <MASK>}</MASK><MASK>}</MASK> if (first) { stringBuffer.append(TEXT_31); <MASK>}</MASK><MASK>}</MASK> if (genClass.needsRootExtendsInterfaceExtendsTag()) { stringBuffer.append(TEXT_32); stringBuffer.append(genModel.getImportedName(genModel.getRootExtendsInterface())); <MASK>}</MASK> stringBuffer.append(TEXT_33); <MASK>}</MASK> else { stringBuffer.append(TEXT_34); stringBuffer.append(genClass.getFormattedName()); stringBuffer.append(TEXT_35); if (!genClass.getImplementedGenFeatures().isEmpty()) { stringBuffer.append(TEXT_36); for (GenFeature genFeature : genClass.getImplementedGenFeatures()) { stringBuffer.append(TEXT_37); stringBuffer.append(genClass.getQualifiedClassName()); stringBuffer.append(TEXT_38); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_39); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_40); <MASK>}</MASK> stringBuffer.append(TEXT_41); <MASK>}</MASK> stringBuffer.append(TEXT_42); <MASK>}</MASK> if (isImplementation) { stringBuffer.append(TEXT_43); if (genClass.isAbstract()) { stringBuffer.append(TEXT_44); <MASK>}</MASK> stringBuffer.append(TEXT_45); stringBuffer.append(genClass.getClassName()); stringBuffer.append(genClass.getTypeParameters().trim()); stringBuffer.append(genClass.getClassExtends()); stringBuffer.append(genClass.getClassImplements()); <MASK>}</MASK> else { stringBuffer.append(TEXT_46); stringBuffer.append(genClass.getInterfaceName()); stringBuffer.append(genClass.getTypeParameters().trim()); stringBuffer.append(genClass.getInterfaceExtends()); <MASK>}</MASK> stringBuffer.append(TEXT_47); if (genModel.hasCopyrightField()) { stringBuffer.append(TEXT_48); stringBuffer.append(publicStaticFinalFlag); stringBuffer.append(genModel.getImportedName("java.lang.String")); stringBuffer.append(TEXT_49); stringBuffer.append(genModel.getCopyrightFieldLiteral()); stringBuffer.append(TEXT_50); stringBuffer.append(genModel.getNonNLS()); stringBuffer.append(TEXT_51); <MASK>}</MASK> if (isImplementation && genModel.getDriverNumber() != null) { stringBuffer.append(TEXT_52); stringBuffer.append(genModel.getImportedName("java.lang.String")); stringBuffer.append(TEXT_53); stringBuffer.append(genModel.getDriverNumber()); stringBuffer.append(TEXT_54); stringBuffer.append(genModel.getNonNLS()); stringBuffer.append(TEXT_55); <MASK>}</MASK> if (isImplementation && genClass.isJavaIOSerializable()) { stringBuffer.append(TEXT_56); <MASK>}</MASK> if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField(); if (eVirtualValuesField != null) { stringBuffer.append(TEXT_57); stringBuffer.append(eVirtualValuesField); stringBuffer.append(TEXT_58); <MASK>}</MASK> { List<String> eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList<String>()); if (!eVirtualIndexBitFields.isEmpty()) { for (String eVirtualIndexBitField : eVirtualIndexBitFields) { stringBuffer.append(TEXT_59); stringBuffer.append(eVirtualIndexBitField); stringBuffer.append(TEXT_60); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> if (isImplementation && genClass.isModelRoot() && genModel.isBooleanFlagsEnabled() && genModel.getBooleanFlagsReservedBits() == -1) { stringBuffer.append(TEXT_61); stringBuffer.append(genModel.getBooleanFlagsField()); stringBuffer.append(TEXT_62); <MASK>}</MASK> if (isImplementation && !genModel.isReflectiveDelegation()) { for (GenFeature genFeature : genClass.getDeclaredFieldGenFeatures()) { if (genFeature.isListType() || genFeature.isReferenceType()) { if (genClass.isField(genFeature)) { stringBuffer.append(TEXT_63); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_64); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_65); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_66); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_67); stringBuffer.append(genFeature.getImportedInternalType(genClass)); stringBuffer.append(TEXT_68); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_69); <MASK>}</MASK> if (genModel.isArrayAccessors() && genFeature.isListType() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) { String rawListItemType = genFeature.getRawListItemType(); int index = rawListItemType.indexOf('['); String head = rawListItemType; String tail = ""; if (index != -1) { head = rawListItemType.substring(0, index); tail = rawListItemType.substring(index); <MASK>}</MASK> stringBuffer.append(TEXT_70); stringBuffer.append(genFeature.getGetArrayAccessor()); stringBuffer.append(TEXT_71); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_72); stringBuffer.append(genFeature.getGetArrayAccessor()); stringBuffer.append(TEXT_73); if (genFeature.getQualifiedListItemType(genClass).contains("<")) { stringBuffer.append(TEXT_74); <MASK>}</MASK> stringBuffer.append(TEXT_75); stringBuffer.append(rawListItemType); stringBuffer.append(TEXT_76); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_77); stringBuffer.append(head); stringBuffer.append(TEXT_78); stringBuffer.append(tail); stringBuffer.append(TEXT_79); <MASK>}</MASK> <MASK>}</MASK> else { if (genFeature.hasEDefault() && (!genFeature.isVolatile() || !genModel.isReflectiveDelegation() && (!genFeature.hasDelegateFeature() || !genFeature.isUnsettable()))) { String staticDefaultValue = genFeature.getStaticDefaultValue(); stringBuffer.append(TEXT_80); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_81); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_82); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_83); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_84); if (genModel.useGenerics() && genFeature.isListDataType() && genFeature.isSetDefaultValue()) { stringBuffer.append(TEXT_85); <MASK>}</MASK> stringBuffer.append(TEXT_86); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_87); stringBuffer.append(genFeature.getEDefault()); if ("".equals(staticDefaultValue)) { stringBuffer.append(TEXT_88); stringBuffer.append(genFeature.getEcoreFeature().getDefaultValueLiteral()); stringBuffer.append(TEXT_89); <MASK>}</MASK> else { stringBuffer.append(TEXT_90); stringBuffer.append(staticDefaultValue); stringBuffer.append(TEXT_91); stringBuffer.append(genModel.getNonNLS(staticDefaultValue)); <MASK>}</MASK> stringBuffer.append(TEXT_92); <MASK>}</MASK> if (genClass.isField(genFeature)) { if (genClass.isFlag(genFeature)) { int flagIndex = genClass.getFlagIndex(genFeature); if (flagIndex > 31 && flagIndex % 32 == 0) { stringBuffer.append(TEXT_93); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_94); <MASK>}</MASK> if (genFeature.isEnumType()) { stringBuffer.append(TEXT_95); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_96); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_97); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_98); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_99); stringBuffer.append(flagIndex % 32); stringBuffer.append(TEXT_100); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_101); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_102); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_103); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_104); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_105); <MASK>}</MASK> else { stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_106); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_107); <MASK>}</MASK> stringBuffer.append(TEXT_108); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_109); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_110); stringBuffer.append(genFeature.getTypeGenClassifier().getFormattedName()); stringBuffer.append(TEXT_111); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_112); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_113); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_114); <MASK>}</MASK> else { stringBuffer.append(TEXT_115); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_116); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_117); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_118); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_119); <MASK>}</MASK> stringBuffer.append(TEXT_120); <MASK>}</MASK> stringBuffer.append(TEXT_121); stringBuffer.append(genClass.getFlagSize(genFeature) > 1 ? "s" : ""); stringBuffer.append(TEXT_122); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_123); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_124); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_125); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_126); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_127); stringBuffer.append(genClass.getFlagMask(genFeature)); stringBuffer.append(TEXT_128); if (genFeature.isEnumType()) { stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_129); <MASK>}</MASK> else { stringBuffer.append(flagIndex % 32); <MASK>}</MASK> stringBuffer.append(TEXT_130); <MASK>}</MASK> else { stringBuffer.append(TEXT_131); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_132); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_133); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_134); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_135); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_136); stringBuffer.append(genFeature.getSafeName()); if (genFeature.hasEDefault()) { stringBuffer.append(TEXT_137); stringBuffer.append(genFeature.getEDefault()); <MASK>}</MASK> stringBuffer.append(TEXT_138); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> if (genClass.isESetField(genFeature)) { if (genClass.isESetFlag(genFeature)) { int flagIndex = genClass.getESetFlagIndex(genFeature); if (flagIndex > 31 && flagIndex % 32 == 0) { stringBuffer.append(TEXT_139); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_140); <MASK>}</MASK> stringBuffer.append(TEXT_141); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_142); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_143); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_144); stringBuffer.append(flagIndex % 32 ); stringBuffer.append(TEXT_145); <MASK>}</MASK> else { stringBuffer.append(TEXT_146); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_147); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_148); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_149); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> //Class/declaredFieldGenFeature.override.javajetinc <MASK>}</MASK> if (isImplementation && genClass.hasOffsetCorrection() && !genClass.getImplementedGenFeatures().isEmpty()) { stringBuffer.append(TEXT_150); stringBuffer.append(genClass.getOffsetCorrectionField(null)); stringBuffer.append(TEXT_151); stringBuffer.append(genClass.getQualifiedClassifierAccessor()); stringBuffer.append(TEXT_152); stringBuffer.append(genClass.getImplementedGenFeatures().get(0).getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_153); stringBuffer.append(genClass.getQualifiedFeatureID(genClass.getImplementedGenFeatures().get(0))); stringBuffer.append(TEXT_154); <MASK>}</MASK> if (isImplementation && genClass.hasOffsetCorrection() && !genModel.isReflectiveDelegation()) { for (GenFeature genFeature : genClass.getImplementedGenFeatures()) { GenFeature reverseFeature = genFeature.getReverse(); if (reverseFeature != null && reverseFeature.getGenClass().hasOffsetCorrection()) { stringBuffer.append(TEXT_155); stringBuffer.append(genClass.getOffsetCorrectionField(genFeature)); stringBuffer.append(TEXT_156); stringBuffer.append(reverseFeature.getGenClass().getQualifiedClassifierAccessor()); stringBuffer.append(TEXT_157); stringBuffer.append(reverseFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_158); stringBuffer.append(reverseFeature.getGenClass().getQualifiedFeatureID(reverseFeature)); stringBuffer.append(TEXT_159); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> if (isImplementation) { stringBuffer.append(TEXT_160); if (genModel.isPublicConstructors()) { stringBuffer.append(TEXT_161); <MASK>}</MASK> else { stringBuffer.append(TEXT_162); <MASK>}</MASK> stringBuffer.append(TEXT_163); stringBuffer.append(genClass.getClassName()); stringBuffer.append(TEXT_164); for (GenFeature genFeature : genClass.getFlagGenFeaturesWithDefault()) { stringBuffer.append(TEXT_165); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_166); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_167); if (!genFeature.isBooleanType()) { stringBuffer.append(TEXT_168); <MASK>}</MASK> stringBuffer.append(TEXT_169); <MASK>}</MASK> stringBuffer.append(TEXT_170); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_171); <MASK>}</MASK> stringBuffer.append(TEXT_172); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EClass")); stringBuffer.append(TEXT_173); stringBuffer.append(genClass.getQualifiedClassifierAccessor()); stringBuffer.append(TEXT_174); <MASK>}</MASK> if (isImplementation && genModel.getFeatureDelegation() == GenDelegationKind.REFLECTIVE_LITERAL && (genClass.getClassExtendsGenClass() == null || genClass.getClassExtendsGenClass().getGenModel().getFeatureDelegation() != GenDelegationKind.REFLECTIVE_LITERAL)) { stringBuffer.append(TEXT_175); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_176); <MASK>}</MASK> stringBuffer.append(TEXT_177); stringBuffer.append(genClass.getClassExtendsGenClass() == null ? 0 : genClass.getClassExtendsGenClass().getAllGenFeatures().size()); stringBuffer.append(TEXT_178); <MASK>}</MASK> //Class/reflectiveDelegation.override.javajetinc new Runnable() { public void run() { for (GenFeature genFeature : (isImplementation ? genClass.getImplementedGenFeatures() : genClass.getDeclaredGenFeatures())) { if (genModel.isArrayAccessors() && genFeature.isListType() && !genFeature.isFeatureMapType() && !genFeature.isMapType()) { stringBuffer.append(TEXT_179); if (!isImplementation) { stringBuffer.append(TEXT_180); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_181); stringBuffer.append(genFeature.getGetArrayAccessor()); stringBuffer.append(TEXT_182); <MASK>}</MASK> else { if (genModel.useGenerics()) { stringBuffer.append(TEXT_183); <MASK>}</MASK> stringBuffer.append(TEXT_184); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_185); stringBuffer.append(genFeature.getGetArrayAccessor()); stringBuffer.append(TEXT_186); if (genFeature.isVolatile()) { stringBuffer.append(TEXT_187); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(genFeature.getListTemplateArguments(genClass)); stringBuffer.append(TEXT_188); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(genFeature.getListTemplateArguments(genClass)); stringBuffer.append(TEXT_189); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_190); if (genModel.useGenerics() && !genFeature.getListItemType(genClass).contains("<") && !genFeature.getListItemType(null).equals(genFeature.getListItemType(genClass))) { stringBuffer.append(TEXT_191); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_192); <MASK>}</MASK> stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_193); <MASK>}</MASK> else { stringBuffer.append(TEXT_194); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_195); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_196); if (genModel.useGenerics() && !genFeature.getListItemType(genClass).contains("<") && !genFeature.getListItemType(null).equals(genFeature.getListItemType(genClass))) { stringBuffer.append(TEXT_197); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_198); <MASK>}</MASK> stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_199); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(genFeature.getListTemplateArguments(genClass)); stringBuffer.append(TEXT_200); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(genFeature.getListTemplateArguments(genClass)); stringBuffer.append(TEXT_201); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_202); <MASK>}</MASK> stringBuffer.append(TEXT_203); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_204); <MASK>}</MASK> stringBuffer.append(TEXT_205); if (!isImplementation) { stringBuffer.append(TEXT_206); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_207); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_208); <MASK>}</MASK> else { stringBuffer.append(TEXT_209); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_210); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_211); if (!genModel.useGenerics()) { stringBuffer.append(TEXT_212); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_213); <MASK>}</MASK> stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_214); <MASK>}</MASK> stringBuffer.append(TEXT_215); if (!isImplementation) { stringBuffer.append(TEXT_216); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_217); <MASK>}</MASK> else { stringBuffer.append(TEXT_218); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_219); if (genFeature.isVolatile()) { stringBuffer.append(TEXT_220); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_221); <MASK>}</MASK> else { stringBuffer.append(TEXT_222); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_223); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_224); <MASK>}</MASK> stringBuffer.append(TEXT_225); <MASK>}</MASK> stringBuffer.append(TEXT_226); if (!isImplementation) { stringBuffer.append(TEXT_227); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_228); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_229); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_230); <MASK>}</MASK> else { stringBuffer.append(TEXT_231); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_232); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_233); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_234); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicEList")); stringBuffer.append(genFeature.getListTemplateArguments(genClass)); stringBuffer.append(TEXT_235); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_236); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_237); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_238); <MASK>}</MASK> stringBuffer.append(TEXT_239); if (!isImplementation) { stringBuffer.append(TEXT_240); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_241); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_242); <MASK>}</MASK> else { stringBuffer.append(TEXT_243); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_244); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_245); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_246); <MASK>}</MASK> <MASK>}</MASK> if (genFeature.isGet() && (isImplementation || !genFeature.isSuppressedGetVisibility())) { if (isInterface) { stringBuffer.append(TEXT_247); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_248); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_249); if (genFeature.isListType()) { if (genFeature.isMapType()) { GenFeature keyFeature = genFeature.getMapEntryTypeGenClass().getMapEntryKeyFeature(); GenFeature valueFeature = genFeature.getMapEntryTypeGenClass().getMapEntryValueFeature(); stringBuffer.append(TEXT_250); if (keyFeature.isListType()) { stringBuffer.append(TEXT_251); stringBuffer.append(keyFeature.getQualifiedListItemType(genClass)); stringBuffer.append(TEXT_252); <MASK>}</MASK> else { stringBuffer.append(TEXT_253); stringBuffer.append(keyFeature.getType(genClass)); stringBuffer.append(TEXT_254); <MASK>}</MASK> stringBuffer.append(TEXT_255); if (valueFeature.isListType()) { stringBuffer.append(TEXT_256); stringBuffer.append(valueFeature.getQualifiedListItemType(genClass)); stringBuffer.append(TEXT_257); <MASK>}</MASK> else { stringBuffer.append(TEXT_258); stringBuffer.append(valueFeature.getType(genClass)); stringBuffer.append(TEXT_259); <MASK>}</MASK> stringBuffer.append(TEXT_260); <MASK>}</MASK> else if (!genFeature.isWrappedFeatureMapType() && !(genModel.isSuppressEMFMetaData() && "org.eclipse.emf.ecore.EObject".equals(genFeature.getQualifiedListItemType(genClass)))) { String typeName = genFeature.getQualifiedListItemType(genClass); String head = typeName; String tail = ""; int index = typeName.indexOf('<'); if (index == -1) { index = typeName.indexOf('['); <MASK>}</MASK> if (index != -1) { head = typeName.substring(0, index); tail = typeName.substring(index).replaceAll("<", "&lt;"); <MASK>}</MASK> stringBuffer.append(TEXT_261); stringBuffer.append(head); stringBuffer.append(TEXT_262); stringBuffer.append(tail); stringBuffer.append(TEXT_263); <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.isSetDefaultValue()) { stringBuffer.append(TEXT_264); stringBuffer.append(genFeature.getDefaultValue()); stringBuffer.append(TEXT_265); <MASK>}</MASK> if (genFeature.getTypeGenEnum() != null) { stringBuffer.append(TEXT_266); stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName()); stringBuffer.append(TEXT_267); <MASK>}</MASK> if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); if (!reverseGenFeature.isSuppressedGetVisibility()) { stringBuffer.append(TEXT_268); stringBuffer.append(reverseGenFeature.getGenClass().getQualifiedInterfaceName()); stringBuffer.append(TEXT_269); stringBuffer.append(reverseGenFeature.getGetAccessor()); stringBuffer.append(TEXT_270); stringBuffer.append(reverseGenFeature.getFormattedName()); stringBuffer.append(TEXT_271); <MASK>}</MASK> <MASK>}</MASK> stringBuffer.append(TEXT_272); if (!genFeature.hasDocumentation()) { stringBuffer.append(TEXT_273); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_274); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_275); <MASK>}</MASK> stringBuffer.append(TEXT_276); if (genFeature.hasDocumentation()) { stringBuffer.append(TEXT_277); stringBuffer.append(genFeature.getDocumentation(genModel.getIndentation(stringBuffer))); stringBuffer.append(TEXT_278); <MASK>}</MASK> stringBuffer.append(TEXT_279); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_280); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_281); if (genFeature.getTypeGenEnum() != null) { stringBuffer.append(TEXT_282); stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName()); <MASK>}</MASK> if (genFeature.isUnsettable()) { if (!genFeature.isSuppressedIsSetVisibility()) { stringBuffer.append(TEXT_283); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_284); <MASK>}</MASK> if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) { stringBuffer.append(TEXT_285); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_286); <MASK>}</MASK> <MASK>}</MASK> if (genFeature.isChangeable() && !genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) { stringBuffer.append(TEXT_287); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_288); stringBuffer.append(genFeature.getRawImportedBoundType()); stringBuffer.append(TEXT_289); <MASK>}</MASK> if (!genModel.isSuppressEMFMetaData()) { stringBuffer.append(TEXT_290); stringBuffer.append(genPackage.getQualifiedPackageInterfaceName()); stringBuffer.append(TEXT_291); stringBuffer.append(genFeature.getFeatureAccessorName()); stringBuffer.append(TEXT_292); <MASK>}</MASK> if (genFeature.isBidirectional() && !genFeature.getReverse().getGenClass().isMapEntry()) { GenFeature reverseGenFeature = genFeature.getReverse(); if (!reverseGenFeature.isSuppressedGetVisibility()) { stringBuffer.append(TEXT_293); stringBuffer.append(reverseGenFeature.getGenClass().getQualifiedInterfaceName()); stringBuffer.append(TEXT_294); stringBuffer.append(reverseGenFeature.getGetAccessor()); <MASK>}</MASK> <MASK>}</MASK> if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genFeature.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false; stringBuffer.append(TEXT_295); stringBuffer.append(modelInfo); <MASK>}</MASK> else { stringBuffer.append(TEXT_296); stringBuffer.append(modelInfo); <MASK>}</MASK><MASK>}</MASK> if (first) { stringBuffer.append(TEXT_297); <MASK>}</MASK><MASK>}</MASK> stringBuffer.append(TEXT_298); //Class/getGenFeature.javadoc.override.javajetinc <MASK>}</MASK> else { stringBuffer.append(TEXT_299); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/getGenFeature.annotations.insert.javajetinc <MASK>}</MASK> <MASK>}</MASK> if (!isImplementation) { stringBuffer.append(TEXT_300); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_301); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_302); <MASK>}</MASK> else { if (genModel.useGenerics() && ((genFeature.isContainer() || genFeature.isResolveProxies()) && !genFeature.isListType() && !genModel.isReflectiveDelegation() && genFeature.isUncheckedCast(genClass) || genFeature.isListType() && (genModel.isReflectiveDelegation() || genModel.isVirtualDelegation()) || genFeature.isListDataType() && genFeature.hasDelegateFeature())) { stringBuffer.append(TEXT_303); <MASK>}</MASK> stringBuffer.append(TEXT_304); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_305); stringBuffer.append(genFeature.getGetAccessor()); if (genClass.hasCollidingGetAccessorOperation(genFeature)) { stringBuffer.append(TEXT_306); <MASK>}</MASK> stringBuffer.append(TEXT_307); if (genModel.isReflectiveDelegation()) { stringBuffer.append(TEXT_308); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_309); <MASK>}</MASK> stringBuffer.append(TEXT_310); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_311); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_312); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_313); stringBuffer.append(genFeature.getPrimitiveValueFunction()); stringBuffer.append(TEXT_314); <MASK>}</MASK> stringBuffer.append(TEXT_315); <MASK>}</MASK> else if (!genFeature.isVolatile()) { if (genFeature.isListType()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_316); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_317); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_318); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_319); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_320); <MASK>}</MASK> stringBuffer.append(TEXT_321); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_322); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_323); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_324); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_325); stringBuffer.append(genClass.getListConstructor(genFeature)); stringBuffer.append(TEXT_326); <MASK>}</MASK> else { stringBuffer.append(TEXT_327); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_328); stringBuffer.append(genClass.getListConstructor(genFeature)); stringBuffer.append(TEXT_329); <MASK>}</MASK> stringBuffer.append(TEXT_330); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes() ? ".map()" : ""); stringBuffer.append(TEXT_331); <MASK>}</MASK> else if (genFeature.isContainer()) { stringBuffer.append(TEXT_332); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_333); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_334); <MASK>}</MASK> else { if (genFeature.isResolveProxies()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_335); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_336); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_337); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_338); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); if (genFeature.hasEDefault()) { stringBuffer.append(TEXT_339); stringBuffer.append(genFeature.getEDefault()); <MASK>}</MASK> stringBuffer.append(TEXT_340); <MASK>}</MASK> stringBuffer.append(TEXT_341); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_342); stringBuffer.append(genFeature.getSafeNameAsEObject()); stringBuffer.append(TEXT_343); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_344); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_345); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_346); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_347); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_348); stringBuffer.append(genFeature.getNonEObjectInternalTypeCast(genClass)); stringBuffer.append(TEXT_349); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_350); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_351); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_352); if (genFeature.isEffectiveContains()) { stringBuffer.append(TEXT_353); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_354); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_355); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_356); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_357); if (!genFeature.isBidirectional()) { stringBuffer.append(TEXT_358); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_359); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_360); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_361); <MASK>}</MASK> else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_362); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_363); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_364); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_365); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_366); <MASK>}</MASK> stringBuffer.append(TEXT_367); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_368); if (!genFeature.isBidirectional()) { stringBuffer.append(TEXT_369); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_370); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_371); <MASK>}</MASK> else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_372); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_373); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_374); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_375); <MASK>}</MASK> stringBuffer.append(TEXT_376); <MASK>}</MASK> else if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_377); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_378); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_379); <MASK>}</MASK> if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_380); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_381); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_382); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_383); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_384); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_385); <MASK>}</MASK> stringBuffer.append(TEXT_386); <MASK>}</MASK> if (!genFeature.isResolveProxies() && genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_387); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_388); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); if (genFeature.hasEDefault()) { stringBuffer.append(TEXT_389); stringBuffer.append(genFeature.getEDefault()); <MASK>}</MASK> stringBuffer.append(TEXT_390); <MASK>}</MASK> else if (genClass.isFlag(genFeature)) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_391); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_392); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_393); <MASK>}</MASK> else { stringBuffer.append(TEXT_394); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_395); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_396); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_397); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_398); <MASK>}</MASK> <MASK>}</MASK> else { stringBuffer.append(TEXT_399); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_400); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> else {//volatile if (genFeature.isResolveProxies() && !genFeature.isListType()) { stringBuffer.append(TEXT_401); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_402); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_403); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_404); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_405); stringBuffer.append(genFeature.getSafeNameAsEObject()); stringBuffer.append(TEXT_406); stringBuffer.append(genFeature.getNonEObjectInternalTypeCast(genClass)); stringBuffer.append(TEXT_407); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_408); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_409); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_410); <MASK>}</MASK> else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); if (genFeature.isFeatureMapType()) { String featureMapEntryTemplateArgument = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50 ? "<" + genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap") + ".Entry>" : ""; if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_411); stringBuffer.append(genFeature.getImportedEffectiveFeatureMapWrapperClass()); stringBuffer.append(TEXT_412); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_413); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_414); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_415); stringBuffer.append(featureMapEntryTemplateArgument); stringBuffer.append(TEXT_416); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_417); <MASK>}</MASK> else { stringBuffer.append(TEXT_418); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_419); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_420); stringBuffer.append(featureMapEntryTemplateArgument); stringBuffer.append(TEXT_421); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_422); <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.isListType()) { if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_423); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_424); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_425); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_426); <MASK>}</MASK> else { stringBuffer.append(TEXT_427); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_428); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_429); <MASK>}</MASK> <MASK>}</MASK> else { if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_430); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_431); <MASK>}</MASK> if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType()) { stringBuffer.append(TEXT_432); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_433); <MASK>}</MASK> stringBuffer.append(TEXT_434); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_435); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_436); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_437); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_438); stringBuffer.append(genFeature.getPrimitiveValueFunction()); stringBuffer.append(TEXT_439); <MASK>}</MASK> stringBuffer.append(TEXT_440); <MASK>}</MASK> else { stringBuffer.append(TEXT_441); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_442); <MASK>}</MASK> if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType()) { stringBuffer.append(TEXT_443); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_444); <MASK>}</MASK> stringBuffer.append(TEXT_445); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_446); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_447); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_448); stringBuffer.append(genFeature.getPrimitiveValueFunction()); stringBuffer.append(TEXT_449); <MASK>}</MASK> stringBuffer.append(TEXT_450); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> else if (genClass.getGetAccessorOperation(genFeature) != null) { stringBuffer.append(TEXT_451); stringBuffer.append(genClass.getGetAccessorOperation(genFeature).getBody(genModel.getIndentation(stringBuffer))); <MASK>}</MASK> else { stringBuffer.append(TEXT_452); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_453); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_454); if (genFeature.isListType()) { stringBuffer.append(TEXT_455); if (genFeature.isMapType()) { stringBuffer.append(TEXT_456); <MASK>}</MASK> else if (genFeature.isFeatureMapType()) { stringBuffer.append(TEXT_457); <MASK>}</MASK> else { stringBuffer.append(TEXT_458); <MASK>}</MASK> stringBuffer.append(TEXT_459); <MASK>}</MASK> stringBuffer.append(TEXT_460); //Class/getGenFeature.todo.override.javajetinc <MASK>}</MASK> <MASK>}</MASK> stringBuffer.append(TEXT_461); <MASK>}</MASK> //Class/getGenFeature.override.javajetinc <MASK>}</MASK> if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicGet()) { stringBuffer.append(TEXT_462); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/basicGetGenFeature.annotations.insert.javajetinc <MASK>}</MASK> stringBuffer.append(TEXT_463); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_464); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_465); if (genFeature.isContainer()) { stringBuffer.append(TEXT_466); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_467); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_468); <MASK>}</MASK> else if (!genFeature.isVolatile()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_469); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_470); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_471); <MASK>}</MASK> else { stringBuffer.append(TEXT_472); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_473); <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_474); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_475); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_476); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_477); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_478); <MASK>}</MASK> else { stringBuffer.append(TEXT_479); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_480); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_481); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_482); <MASK>}</MASK> <MASK>}</MASK> else { stringBuffer.append(TEXT_483); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_484); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_485); //Class/basicGetGenFeature.todo.override.javajetinc <MASK>}</MASK> stringBuffer.append(TEXT_486); //Class/basicGetGenFeature.override.javajetinc <MASK>}</MASK> if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicSet()) { stringBuffer.append(TEXT_487); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/basicSetGenFeature.annotations.insert.javajetinc <MASK>}</MASK> stringBuffer.append(TEXT_488); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_489); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_490); stringBuffer.append(genFeature.getImportedInternalType(genClass)); stringBuffer.append(TEXT_491); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_492); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_493); if (genFeature.isContainer()) { stringBuffer.append(TEXT_494); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_495); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_496); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_497); stringBuffer.append(TEXT_498); <MASK>}</MASK> else if (!genFeature.isVolatile()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_499); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_500); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_501); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_502); <MASK>}</MASK> else { stringBuffer.append(TEXT_503); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_504); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_505); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_506); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_507); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_508); <MASK>}</MASK> if (genFeature.isUnsettable()) { if (genModel.isVirtualDelegation()) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_509); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_510); <MASK>}</MASK> <MASK>}</MASK> else if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_511); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_512); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_513); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_514); if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_515); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_516); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_517); <MASK>}</MASK> <MASK>}</MASK> else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_518); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_519); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_520); <MASK>}</MASK> stringBuffer.append(TEXT_521); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_522); <MASK>}</MASK> <MASK>}</MASK> if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_523); if (genFeature.isUnsettable()) { stringBuffer.append(TEXT_524); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_525); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_526); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_527); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_528); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_529); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> else { stringBuffer.append(TEXT_530); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> stringBuffer.append(TEXT_531); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_532); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_533); <MASK>}</MASK> else { stringBuffer.append(TEXT_534); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_535); <MASK>}</MASK> stringBuffer.append(TEXT_536); <MASK>}</MASK> else { stringBuffer.append(TEXT_537); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_538); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_539); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_540); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_541); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_542); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_543); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> else { stringBuffer.append(TEXT_544); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> stringBuffer.append(TEXT_545); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_546); <MASK>}</MASK> stringBuffer.append(TEXT_547); <MASK>}</MASK> stringBuffer.append(TEXT_548); <MASK>}</MASK> else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_549); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_550); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_551); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_552); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_553); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_554); <MASK>}</MASK> else { stringBuffer.append(TEXT_555); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_556); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_557); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_558); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_559); <MASK>}</MASK> <MASK>}</MASK> else { stringBuffer.append(TEXT_560); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_561); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_562); //Class/basicSetGenFeature.todo.override.javajetinc <MASK>}</MASK> stringBuffer.append(TEXT_563); //Class/basicSetGenFeature.override.javajetinc <MASK>}</MASK> if (genFeature.isSet() && (isImplementation || !genFeature.isSuppressedSetVisibility())) { if (isInterface) { stringBuffer.append(TEXT_564); stringBuffer.append(genClass.getQualifiedInterfaceName()); stringBuffer.append(TEXT_565); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_566); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_567); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_568); stringBuffer.append(TEXT_569); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_570); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_571); if (genFeature.isEnumType()) { stringBuffer.append(TEXT_572); stringBuffer.append(genFeature.getTypeGenEnum().getQualifiedName()); <MASK>}</MASK> if (genFeature.isUnsettable()) { if (!genFeature.isSuppressedIsSetVisibility()) { stringBuffer.append(TEXT_573); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_574); <MASK>}</MASK> if (!genFeature.isSuppressedUnsetVisibility()) { stringBuffer.append(TEXT_575); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_576); <MASK>}</MASK> <MASK>}</MASK> stringBuffer.append(TEXT_577); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_578); //Class/setGenFeature.javadoc.override.javajetinc <MASK>}</MASK> else { stringBuffer.append(TEXT_579); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/setGenFeature.annotations.insert.javajetinc <MASK>}</MASK> <MASK>}</MASK> if (!isImplementation) { stringBuffer.append(TEXT_580); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_581); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_582); <MASK>}</MASK> else { GenOperation setAccessorOperation = genClass.getSetAccessorOperation(genFeature); stringBuffer.append(TEXT_583); stringBuffer.append(genFeature.getAccessorName()); if (genClass.hasCollidingSetAccessorOperation(genFeature)) { stringBuffer.append(TEXT_584); <MASK>}</MASK> stringBuffer.append(TEXT_585); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_586); stringBuffer.append(setAccessorOperation == null ? "new" + genFeature.getCapName() : setAccessorOperation.getGenParameters().get(0).getName()); stringBuffer.append(TEXT_587); if (genModel.isReflectiveDelegation()) { stringBuffer.append(TEXT_588); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_589); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_590); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_591); <MASK>}</MASK> stringBuffer.append(TEXT_592); stringBuffer.append(genFeature.getCapName()); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_593); <MASK>}</MASK> stringBuffer.append(TEXT_594); <MASK>}</MASK> else if (!genFeature.isVolatile()) { if (genFeature.isContainer()) { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_595); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_596); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_597); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_598); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EcoreUtil")); stringBuffer.append(TEXT_599); stringBuffer.append(genFeature.getEObjectCast()); stringBuffer.append(TEXT_600); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_601); stringBuffer.append(genModel.getImportedName("java.lang.IllegalArgumentException")); stringBuffer.append(TEXT_602); stringBuffer.append(genModel.getNonNLS()); stringBuffer.append(TEXT_603); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_604); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_605); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_606); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_607); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_608); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_609); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_610); stringBuffer.append(genFeature.getInternalTypeCast()); stringBuffer.append(TEXT_611); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_612); if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_613); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_614); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_615); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_616); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_617); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_618); <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_619); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_620); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_621); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_622); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_623); <MASK>}</MASK> stringBuffer.append(TEXT_624); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_625); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_626); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_627); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_628); if (!genFeature.isBidirectional()) { stringBuffer.append(TEXT_629); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_630); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_631); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_632); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_633); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_634); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_635); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_636); <MASK>}</MASK> else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_637); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_638); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_639); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_640); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_641); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_642); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_643); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_644); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_645); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_646); <MASK>}</MASK> stringBuffer.append(TEXT_647); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_648); stringBuffer.append(genFeature.getInternalTypeCast()); stringBuffer.append(TEXT_649); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_650); if (genFeature.isUnsettable()) { stringBuffer.append(TEXT_651); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_652); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_653); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_654); <MASK>}</MASK> else if (genClass.isESetFlag(genFeature)) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_655); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_656); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_657); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_658); <MASK>}</MASK> stringBuffer.append(TEXT_659); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_660); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_661); <MASK>}</MASK> else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_662); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_663); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_664); <MASK>}</MASK> stringBuffer.append(TEXT_665); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_666); <MASK>}</MASK> if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_667); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_668); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_669); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_670); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_671); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_672); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_673); <MASK>}</MASK> stringBuffer.append(TEXT_674); <MASK>}</MASK> else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_675); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_676); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_677); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_678); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_679); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_680); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> else { if (genClass.isFlag(genFeature)) { if (!genModel.isSuppressNotification()) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_681); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_682); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_683); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_684); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_685); <MASK>}</MASK> else { stringBuffer.append(TEXT_686); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_687); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_688); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_689); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_690); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_691); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_692); <MASK>}</MASK> <MASK>}</MASK> if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_693); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_694); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_695); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_696); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_697); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_698); <MASK>}</MASK> else { stringBuffer.append(TEXT_699); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_700); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_701); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_702); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_703); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_704); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_705); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { stringBuffer.append(TEXT_706); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_707); <MASK>}</MASK> else { stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_708); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_709); <MASK>}</MASK> stringBuffer.append(TEXT_710); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_711); <MASK>}</MASK> <MASK>}</MASK> else { if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_712); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_713); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_714); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_715); <MASK>}</MASK> <MASK>}</MASK> if (genFeature.isEnumType()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_716); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_717); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_718); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_719); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_720); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_721); <MASK>}</MASK> else { stringBuffer.append(TEXT_722); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_723); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_724); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_725); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_726); <MASK>}</MASK> <MASK>}</MASK> else { if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_727); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_728); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_729); stringBuffer.append(genFeature.getInternalTypeCast()); stringBuffer.append(TEXT_730); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_731); <MASK>}</MASK> else { stringBuffer.append(TEXT_732); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_733); stringBuffer.append(genFeature.getInternalTypeCast()); stringBuffer.append(TEXT_734); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_735); <MASK>}</MASK> <MASK>}</MASK> if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_736); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_737); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_738); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_739); <MASK>}</MASK> <MASK>}</MASK> if (genFeature.isUnsettable()) { if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_740); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_741); <MASK>}</MASK> else if (genClass.isESetFlag(genFeature)) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_742); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_743); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_744); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_745); <MASK>}</MASK> stringBuffer.append(TEXT_746); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_747); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_748); <MASK>}</MASK> else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_749); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_750); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_751); <MASK>}</MASK> stringBuffer.append(TEXT_752); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_753); <MASK>}</MASK> if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_754); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_755); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_756); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_757); if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_758); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_759); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> else { stringBuffer.append(TEXT_760); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> stringBuffer.append(TEXT_761); if (genClass.isFlag(genFeature)) { stringBuffer.append(TEXT_762); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> else { stringBuffer.append(genFeature.getSafeName()); <MASK>}</MASK> stringBuffer.append(TEXT_763); if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_764); <MASK>}</MASK> else { stringBuffer.append(TEXT_765); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_766); <MASK>}</MASK> stringBuffer.append(TEXT_767); <MASK>}</MASK> <MASK>}</MASK> else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_768); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_769); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_770); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_771); if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_772); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_773); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_774); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> else { stringBuffer.append(TEXT_775); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> stringBuffer.append(TEXT_776); if (genClass.isFlag(genFeature)) { stringBuffer.append(TEXT_777); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> else { stringBuffer.append(genFeature.getSafeName()); <MASK>}</MASK> stringBuffer.append(TEXT_778); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_779); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_780); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_781); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_782); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_783); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_784); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_785); <MASK>}</MASK> stringBuffer.append(TEXT_786); stringBuffer.append(genFeature.getCapName()); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_787); <MASK>}</MASK> stringBuffer.append(TEXT_788); <MASK>}</MASK> else { stringBuffer.append(TEXT_789); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_790); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_791); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_792); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_793); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_794); <MASK>}</MASK> stringBuffer.append(TEXT_795); stringBuffer.append(genFeature.getCapName()); if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_796); <MASK>}</MASK> stringBuffer.append(TEXT_797); <MASK>}</MASK> <MASK>}</MASK> else if (setAccessorOperation != null) { stringBuffer.append(TEXT_798); stringBuffer.append(setAccessorOperation.getBody(genModel.getIndentation(stringBuffer))); <MASK>}</MASK> else { stringBuffer.append(TEXT_799); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_800); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_801); //Class/setGenFeature.todo.override.javajetinc <MASK>}</MASK> stringBuffer.append(TEXT_802); <MASK>}</MASK> //Class/setGenFeature.override.javajetinc <MASK>}</MASK> if (isImplementation && !genModel.isReflectiveDelegation() && genFeature.isBasicUnset()) { stringBuffer.append(TEXT_803); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/basicUnsetGenFeature.annotations.insert.javajetinc <MASK>}</MASK> stringBuffer.append(TEXT_804); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_805); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_806); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_807); if (!genFeature.isVolatile()) { if (genModel.isVirtualDelegation()) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_808); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_809); <MASK>}</MASK> stringBuffer.append(TEXT_810); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_811); <MASK>}</MASK> else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_812); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_813); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_814); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_815); <MASK>}</MASK> stringBuffer.append(TEXT_816); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_817); <MASK>}</MASK> if (genModel.isVirtualDelegation()) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_818); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_819); <MASK>}</MASK> <MASK>}</MASK> else if (genClass.isESetFlag(genFeature)) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_820); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_821); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_822); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_823); <MASK>}</MASK> stringBuffer.append(TEXT_824); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_825); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_826); <MASK>}</MASK> else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_827); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_828); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_829); <MASK>}</MASK> stringBuffer.append(TEXT_830); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_831); <MASK>}</MASK> if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_832); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_833); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_834); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_835); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_836); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_837); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_838); <MASK>}</MASK> else { stringBuffer.append(TEXT_839); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> stringBuffer.append(TEXT_840); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_841); <MASK>}</MASK> else { stringBuffer.append(TEXT_842); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_843); <MASK>}</MASK> stringBuffer.append(TEXT_844); <MASK>}</MASK> <MASK>}</MASK> else { stringBuffer.append(TEXT_845); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_846); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_847); //Class/basicUnsetGenFeature.todo.override.javajetinc <MASK>}</MASK> stringBuffer.append(TEXT_848); //Class.basicUnsetGenFeature.override.javajetinc <MASK>}</MASK> if (genFeature.isUnset() && (isImplementation || !genFeature.isSuppressedUnsetVisibility())) { if (isInterface) { stringBuffer.append(TEXT_849); stringBuffer.append(genClass.getQualifiedInterfaceName()); stringBuffer.append(TEXT_850); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_851); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_852); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_853); stringBuffer.append(TEXT_854); if (!genFeature.isSuppressedIsSetVisibility()) { stringBuffer.append(TEXT_855); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_856); <MASK>}</MASK> stringBuffer.append(TEXT_857); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_858); if (!genFeature.isListType() && !genFeature.isSuppressedSetVisibility()) { stringBuffer.append(TEXT_859); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_860); stringBuffer.append(genFeature.getRawImportedBoundType()); stringBuffer.append(TEXT_861); <MASK>}</MASK> stringBuffer.append(TEXT_862); //Class/unsetGenFeature.javadoc.override.javajetinc <MASK>}</MASK> else { stringBuffer.append(TEXT_863); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/unsetGenFeature.annotations.insert.javajetinc <MASK>}</MASK> <MASK>}</MASK> if (!isImplementation) { stringBuffer.append(TEXT_864); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_865); <MASK>}</MASK> else { stringBuffer.append(TEXT_866); stringBuffer.append(genFeature.getAccessorName()); if (genClass.hasCollidingUnsetAccessorOperation(genFeature)) { stringBuffer.append(TEXT_867); <MASK>}</MASK> stringBuffer.append(TEXT_868); if (genModel.isReflectiveDelegation()) { stringBuffer.append(TEXT_869); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_870); <MASK>}</MASK> else if (!genFeature.isVolatile()) { if (genFeature.isListType()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_871); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_872); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_873); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_874); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_875); <MASK>}</MASK> stringBuffer.append(TEXT_876); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_877); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); stringBuffer.append(TEXT_878); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_879); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_880); <MASK>}</MASK> else if (genFeature.isBidirectional() || genFeature.isEffectiveContains()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_881); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_882); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_883); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_884); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_885); <MASK>}</MASK> stringBuffer.append(TEXT_886); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_887); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_888); if (!genFeature.isBidirectional()) { stringBuffer.append(TEXT_889); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_890); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_891); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_892); <MASK>}</MASK> else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_893); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_894); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_895); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_896); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_897); <MASK>}</MASK> stringBuffer.append(TEXT_898); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_899); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_900); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_901); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_902); <MASK>}</MASK> else if (genClass.isESetFlag(genFeature)) { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_903); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_904); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_905); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_906); <MASK>}</MASK> stringBuffer.append(TEXT_907); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_908); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_909); <MASK>}</MASK> else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_910); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_911); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_912); <MASK>}</MASK> stringBuffer.append(TEXT_913); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_914); <MASK>}</MASK> if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_915); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_916); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_917); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_918); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_919); <MASK>}</MASK> stringBuffer.append(TEXT_920); <MASK>}</MASK> else { if (genClass.isFlag(genFeature)) { if (!genModel.isSuppressNotification()) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_921); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_922); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_923); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_924); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_925); <MASK>}</MASK> else { stringBuffer.append(TEXT_926); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_927); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_928); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_929); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_930); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_931); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_932); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> else if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_933); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_934); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_935); <MASK>}</MASK> else { if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_936); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_937); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_938); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_939); <MASK>}</MASK> <MASK>}</MASK> if (!genModel.isSuppressNotification()) { if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_940); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_941); <MASK>}</MASK> else if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_942); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_943); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_944); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_945); <MASK>}</MASK> else { stringBuffer.append(TEXT_946); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_947); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_948); <MASK>}</MASK> <MASK>}</MASK> if (genFeature.isReferenceType()) { stringBuffer.append(TEXT_949); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_950); if (!genModel.isVirtualDelegation()) { if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_951); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_952); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_953); <MASK>}</MASK> else { stringBuffer.append(TEXT_954); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_955); <MASK>}</MASK> <MASK>}</MASK> if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_956); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_957); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_958); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_959); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_960); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_961); <MASK>}</MASK> else { stringBuffer.append(TEXT_962); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> stringBuffer.append(TEXT_963); if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_964); <MASK>}</MASK> else { stringBuffer.append(TEXT_965); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_966); <MASK>}</MASK> stringBuffer.append(TEXT_967); <MASK>}</MASK> <MASK>}</MASK> else { if (genClass.isFlag(genFeature)) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_968); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_969); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_970); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_971); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_972); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_973); <MASK>}</MASK> else { stringBuffer.append(TEXT_974); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_975); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_976); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_977); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_978); <MASK>}</MASK> <MASK>}</MASK> else if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_979); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_980); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_981); <MASK>}</MASK> if (!genModel.isVirtualDelegation() || genFeature.isPrimitiveType()) { if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_982); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_983); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_984); <MASK>}</MASK> else { stringBuffer.append(TEXT_985); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_986); <MASK>}</MASK> <MASK>}</MASK> if (!genModel.isSuppressNotification()) { stringBuffer.append(TEXT_987); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")); stringBuffer.append(TEXT_988); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.Notification")); stringBuffer.append(TEXT_989); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_990); if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_991); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_992); stringBuffer.append(genFeature.getEDefault()); <MASK>}</MASK> else { stringBuffer.append(TEXT_993); stringBuffer.append(genFeature.getCapName()); <MASK>}</MASK> stringBuffer.append(TEXT_994); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_995); if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_996); <MASK>}</MASK> else { stringBuffer.append(TEXT_997); stringBuffer.append(genFeature.getCapName()); stringBuffer.append(TEXT_998); <MASK>}</MASK> stringBuffer.append(TEXT_999); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_1000); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1001); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1002); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_1003); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_1004); <MASK>}</MASK> else { stringBuffer.append(TEXT_1005); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1006); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_1007); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_1008); <MASK>}</MASK> <MASK>}</MASK> else if (genClass.getUnsetAccessorOperation(genFeature) != null) { stringBuffer.append(TEXT_1009); stringBuffer.append(genClass.getUnsetAccessorOperation(genFeature).getBody(genModel.getIndentation(stringBuffer))); <MASK>}</MASK> else { stringBuffer.append(TEXT_1010); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_1011); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_1012); //Class/unsetGenFeature.todo.override.javajetinc <MASK>}</MASK> stringBuffer.append(TEXT_1013); <MASK>}</MASK> //Class/unsetGenFeature.override.javajetinc <MASK>}</MASK> if (genFeature.isIsSet() && (isImplementation || !genFeature.isSuppressedIsSetVisibility())) { if (isInterface) { stringBuffer.append(TEXT_1014); stringBuffer.append(genClass.getQualifiedInterfaceName()); stringBuffer.append(TEXT_1015); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1016); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_1017); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_1018); stringBuffer.append(TEXT_1019); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_1020); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_1021); if (genFeature.isChangeable() && !genFeature.isSuppressedUnsetVisibility()) { stringBuffer.append(TEXT_1022); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1023); <MASK>}</MASK> stringBuffer.append(TEXT_1024); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1025); if (!genFeature.isListType() && genFeature.isChangeable() && !genFeature.isSuppressedSetVisibility()) { stringBuffer.append(TEXT_1026); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1027); stringBuffer.append(genFeature.getRawImportedBoundType()); stringBuffer.append(TEXT_1028); <MASK>}</MASK> stringBuffer.append(TEXT_1029); //Class/isSetGenFeature.javadoc.override.javajetinc <MASK>}</MASK> else { stringBuffer.append(TEXT_1030); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/isSetGenFeature.annotations.insert.javajetinc <MASK>}</MASK> <MASK>}</MASK> if (!isImplementation) { stringBuffer.append(TEXT_1031); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1032); <MASK>}</MASK> else { stringBuffer.append(TEXT_1033); stringBuffer.append(genFeature.getAccessorName()); if (genClass.hasCollidingIsSetAccessorOperation(genFeature)) { stringBuffer.append(TEXT_1034); <MASK>}</MASK> stringBuffer.append(TEXT_1035); if (genModel.isReflectiveDelegation()) { stringBuffer.append(TEXT_1036); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_1037); <MASK>}</MASK> else if (!genFeature.isVolatile()) { if (genFeature.isListType()) { if (genModel.isVirtualDelegation()) { stringBuffer.append(TEXT_1038); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1039); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1040); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1041); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1042); <MASK>}</MASK> stringBuffer.append(TEXT_1043); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1044); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); stringBuffer.append(TEXT_1045); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_1046); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1047); <MASK>}</MASK> else { if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1048); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1049); <MASK>}</MASK> else if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_1050); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_1051); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1052); <MASK>}</MASK> else { stringBuffer.append(TEXT_1053); stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_1054); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.hasDelegateFeature()) { GenFeature delegateFeature = genFeature.getDelegateFeature(); if (delegateFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_1055); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1056); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1057); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_1058); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_1059); <MASK>}</MASK> else { stringBuffer.append(TEXT_1060); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1061); stringBuffer.append(delegateFeature.getAccessorName()); stringBuffer.append(TEXT_1062); stringBuffer.append(genFeature.getQualifiedFeatureAccessor()); stringBuffer.append(TEXT_1063); <MASK>}</MASK> <MASK>}</MASK> else if (genClass.getIsSetAccessorOperation(genFeature) != null) { stringBuffer.append(TEXT_1064); stringBuffer.append(genClass.getIsSetAccessorOperation(genFeature).getBody(genModel.getIndentation(stringBuffer))); <MASK>}</MASK> else { stringBuffer.append(TEXT_1065); stringBuffer.append(genFeature.getFormattedName()); stringBuffer.append(TEXT_1066); stringBuffer.append(genFeature.getFeatureKind()); stringBuffer.append(TEXT_1067); //Class/isSetGenFeature.todo.override.javajetinc <MASK>}</MASK> stringBuffer.append(TEXT_1068); <MASK>}</MASK> //Class/isSetGenFeature.override.javajetinc <MASK>}</MASK> //Class/genFeature.override.javajetinc <MASK>}</MASK>//for <MASK>}</MASK><MASK>}</MASK>.run(); for (GenOperation genOperation : (isImplementation ? genClass.getImplementedGenOperations() : genClass.getDeclaredGenOperations())) { if (isInterface) { stringBuffer.append(TEXT_1069); stringBuffer.append(TEXT_1070); if (genOperation.hasDocumentation() || genOperation.hasParameterDocumentation()) { stringBuffer.append(TEXT_1071); if (genOperation.hasDocumentation()) { stringBuffer.append(TEXT_1072); stringBuffer.append(genOperation.getDocumentation(genModel.getIndentation(stringBuffer))); <MASK>}</MASK> for (GenParameter genParameter : genOperation.getGenParameters()) { if (genParameter.hasDocumentation()) { String documentation = genParameter.getDocumentation(""); if (documentation.contains("\n") || documentation.contains("\r")) { stringBuffer.append(TEXT_1073); stringBuffer.append(genParameter.getName()); stringBuffer.append(TEXT_1074); stringBuffer.append(genParameter.getDocumentation(genModel.getIndentation(stringBuffer))); <MASK>}</MASK> else { stringBuffer.append(TEXT_1075); stringBuffer.append(genParameter.getName()); stringBuffer.append(TEXT_1076); stringBuffer.append(genParameter.getDocumentation(genModel.getIndentation(stringBuffer))); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> stringBuffer.append(TEXT_1077); <MASK>}</MASK> if (!genModel.isSuppressEMFModelTags()) { boolean first = true; for (StringTokenizer stringTokenizer = new StringTokenizer(genOperation.getModelInfo(), "\n\r"); stringTokenizer.hasMoreTokens(); ) { String modelInfo = stringTokenizer.nextToken(); if (first) { first = false; stringBuffer.append(TEXT_1078); stringBuffer.append(modelInfo); <MASK>}</MASK> else { stringBuffer.append(TEXT_1079); stringBuffer.append(modelInfo); <MASK>}</MASK><MASK>}</MASK> if (first) { stringBuffer.append(TEXT_1080); <MASK>}</MASK><MASK>}</MASK> stringBuffer.append(TEXT_1081); //Class/genOperation.javadoc.override.javajetinc <MASK>}</MASK> else { stringBuffer.append(TEXT_1082); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { //Class/genOperation.annotations.insert.javajetinc <MASK>}</MASK> <MASK>}</MASK> if (!isImplementation) { stringBuffer.append(TEXT_1083); stringBuffer.append(genOperation.getTypeParameters(genClass)); stringBuffer.append(genOperation.getImportedType(genClass)); stringBuffer.append(TEXT_1084); stringBuffer.append(genOperation.getName()); stringBuffer.append(TEXT_1085); stringBuffer.append(genOperation.getParameters(genClass)); stringBuffer.append(TEXT_1086); stringBuffer.append(genOperation.getThrows(genClass)); stringBuffer.append(TEXT_1087); <MASK>}</MASK> else { stringBuffer.append(TEXT_1088); stringBuffer.append(genOperation.getTypeParameters(genClass)); stringBuffer.append(genOperation.getImportedType(genClass)); stringBuffer.append(TEXT_1089); stringBuffer.append(genOperation.getName()); stringBuffer.append(TEXT_1090); stringBuffer.append(genOperation.getParameters(genClass)); stringBuffer.append(TEXT_1091); stringBuffer.append(genOperation.getThrows(genClass)); stringBuffer.append(TEXT_1092); if (genOperation.hasBody()) { stringBuffer.append(TEXT_1093); stringBuffer.append(genOperation.getBody(genModel.getIndentation(stringBuffer))); <MASK>}</MASK> else if (genOperation.isInvariant()) {GenClass opClass = genOperation.getGenClass(); String diagnostics = genOperation.getGenParameters().get(0).getName(); String context = genOperation.getGenParameters().get(1).getName(); stringBuffer.append(TEXT_1094); stringBuffer.append(diagnostics); stringBuffer.append(TEXT_1095); stringBuffer.append(diagnostics); stringBuffer.append(TEXT_1096); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")); stringBuffer.append(TEXT_1097); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")); stringBuffer.append(TEXT_1098); stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName()); stringBuffer.append(TEXT_1099); stringBuffer.append(opClass.getGenPackage().getImportedValidatorClassName()); stringBuffer.append(TEXT_1100); stringBuffer.append(opClass.getOperationID(genOperation)); stringBuffer.append(TEXT_1101); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")); stringBuffer.append(TEXT_1102); stringBuffer.append(genOperation.getName()); stringBuffer.append(TEXT_1103); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator")); stringBuffer.append(TEXT_1104); stringBuffer.append(context); stringBuffer.append(TEXT_1105); stringBuffer.append(genModel.getNonNLS()); stringBuffer.append(genModel.getNonNLS(2)); stringBuffer.append(TEXT_1106); <MASK>}</MASK> else { stringBuffer.append(TEXT_1107); //Class/implementedGenOperation.todo.override.javajetinc <MASK>}</MASK> stringBuffer.append(TEXT_1108); <MASK>}</MASK> //Class/implementedGenOperation.override.javajetinc <MASK>}</MASK>//for if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseAddGenFeatures())) { stringBuffer.append(TEXT_1109); if (genModel.useGenerics()) { for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) { if (genFeature.isUncheckedCast(genClass)) { stringBuffer.append(TEXT_1110); break; <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1111); <MASK>}</MASK> stringBuffer.append(TEXT_1112); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_1113); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_1114); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_1115); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1116); for (GenFeature genFeature : genClass.getEInverseAddGenFeatures()) { stringBuffer.append(TEXT_1117); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1118); if (genFeature.isListType()) { String cast = "(" + genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList") + (!genModel.useGenerics() ? ")" : "<" + genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject") + ">)(" + genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList") + "<?>)"); if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) { stringBuffer.append(TEXT_1119); stringBuffer.append(cast); stringBuffer.append(TEXT_1120); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); stringBuffer.append(TEXT_1121); stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass)); stringBuffer.append(TEXT_1122); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1123); <MASK>}</MASK> else { stringBuffer.append(TEXT_1124); stringBuffer.append(cast); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1125); <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.isContainer()) { stringBuffer.append(TEXT_1126); if (genFeature.isBasicSet()) { stringBuffer.append(TEXT_1127); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1128); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1129); <MASK>}</MASK> else { stringBuffer.append(TEXT_1130); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1131); <MASK>}</MASK> <MASK>}</MASK> else { if (genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1132); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1133); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1134); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1135); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1136); <MASK>}</MASK> else if (genFeature.isVolatile()) { stringBuffer.append(TEXT_1137); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1138); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1139); if (genFeature.isResolveProxies()) { stringBuffer.append(TEXT_1140); stringBuffer.append(genFeature.getAccessorName()); <MASK>}</MASK> else { stringBuffer.append(genFeature.getGetAccessor()); <MASK>}</MASK> stringBuffer.append(TEXT_1141); <MASK>}</MASK> stringBuffer.append(TEXT_1142); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1143); if (genFeature.isEffectiveContains()) { stringBuffer.append(TEXT_1144); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_1145); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1146); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1147); <MASK>}</MASK> else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_1148); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_1149); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1150); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_1151); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_1152); <MASK>}</MASK> stringBuffer.append(TEXT_1153); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1154); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1155); <MASK>}</MASK> <MASK>}</MASK> stringBuffer.append(TEXT_1156); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1157); <MASK>}</MASK> else { stringBuffer.append(TEXT_1158); <MASK>}</MASK> stringBuffer.append(TEXT_1159); <MASK>}</MASK> if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEInverseRemoveGenFeatures())) { stringBuffer.append(TEXT_1160); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1161); <MASK>}</MASK> stringBuffer.append(TEXT_1162); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_1163); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")); stringBuffer.append(TEXT_1164); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_1165); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1166); for (GenFeature genFeature : genClass.getEInverseRemoveGenFeatures()) { stringBuffer.append(TEXT_1167); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1168); if (genFeature.isListType()) { if (genFeature.isMapType() && genFeature.isEffectiveSuppressEMFTypes()) { stringBuffer.append(TEXT_1169); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_1170); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); stringBuffer.append(TEXT_1171); stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass)); stringBuffer.append(TEXT_1172); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1173); <MASK>}</MASK> else if (genFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_1174); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_1175); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1176); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1177); <MASK>}</MASK> else { stringBuffer.append(TEXT_1178); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.InternalEList")); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_1179); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1180); <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.isContainer() && !genFeature.isBasicSet()) { stringBuffer.append(TEXT_1181); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1182); <MASK>}</MASK> else if (genFeature.isUnsettable()) { stringBuffer.append(TEXT_1183); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1184); <MASK>}</MASK> else { stringBuffer.append(TEXT_1185); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1186); <MASK>}</MASK> <MASK>}</MASK> stringBuffer.append(TEXT_1187); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1188); <MASK>}</MASK> else { stringBuffer.append(TEXT_1189); <MASK>}</MASK> stringBuffer.append(TEXT_1190); <MASK>}</MASK> if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEBasicRemoveFromContainerGenFeatures())) { stringBuffer.append(TEXT_1191); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1192); <MASK>}</MASK> stringBuffer.append(TEXT_1193); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_1194); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.notify.NotificationChain")); stringBuffer.append(TEXT_1195); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1196); for (GenFeature genFeature : genClass.getEBasicRemoveFromContainerGenFeatures()) { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass(); String reverseOffsetCorrection = targetClass.hasOffsetCorrection() ? " + " + genClass.getOffsetCorrectionField(reverseFeature) : ""; stringBuffer.append(TEXT_1197); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1198); stringBuffer.append(targetClass.getQualifiedFeatureID(reverseFeature)); stringBuffer.append(reverseOffsetCorrection); stringBuffer.append(TEXT_1199); stringBuffer.append(targetClass.getImportedInterfaceName()); stringBuffer.append(TEXT_1200); <MASK>}</MASK> stringBuffer.append(TEXT_1201); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1202); <MASK>}</MASK> else { stringBuffer.append(TEXT_1203); <MASK>}</MASK> stringBuffer.append(TEXT_1204); <MASK>}</MASK> if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEGetGenFeatures())) { stringBuffer.append(TEXT_1205); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1206); <MASK>}</MASK> stringBuffer.append(TEXT_1207); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1208); for (GenFeature genFeature : genClass.getEGetGenFeatures()) { stringBuffer.append(TEXT_1209); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1210); if (genFeature.isPrimitiveType()) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_1211); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1212); <MASK>}</MASK> else { stringBuffer.append(TEXT_1213); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_1214); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1215); <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.isResolveProxies() && !genFeature.isListType()) { stringBuffer.append(TEXT_1216); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1217); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1218); <MASK>}</MASK> else if (genFeature.isMapType()) { if (genFeature.isEffectiveSuppressEMFTypes()) { stringBuffer.append(TEXT_1219); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); stringBuffer.append(TEXT_1220); stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass)); stringBuffer.append(TEXT_1221); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1222); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1223); <MASK>}</MASK> else { stringBuffer.append(TEXT_1224); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1225); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1226); <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_1227); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1228); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1229); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1230); <MASK>}</MASK> else if (genFeature.isFeatureMapType()) { stringBuffer.append(TEXT_1231); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1232); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1233); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1234); <MASK>}</MASK> else { stringBuffer.append(TEXT_1235); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1236); <MASK>}</MASK> <MASK>}</MASK> stringBuffer.append(TEXT_1237); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1238); <MASK>}</MASK> else { stringBuffer.append(TEXT_1239); <MASK>}</MASK> stringBuffer.append(TEXT_1240); <MASK>}</MASK> if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getESetGenFeatures())) { stringBuffer.append(TEXT_1241); if (genModel.useGenerics()) { for (GenFeature genFeature : genClass.getESetGenFeatures()) { if (genFeature.isUncheckedCast(genClass) && !genFeature.isFeatureMapType() && !genFeature.isMapType()) { stringBuffer.append(TEXT_1242); break; <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1243); <MASK>}</MASK> stringBuffer.append(TEXT_1244); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1245); for (GenFeature genFeature : genClass.getESetGenFeatures()) { stringBuffer.append(TEXT_1246); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1247); if (genFeature.isListType()) { if (genFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_1248); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1249); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1250); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1251); <MASK>}</MASK> else if (genFeature.isFeatureMapType()) { stringBuffer.append(TEXT_1252); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1253); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1254); <MASK>}</MASK> else if (genFeature.isMapType()) { if (genFeature.isEffectiveSuppressEMFTypes()) { stringBuffer.append(TEXT_1255); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); stringBuffer.append(TEXT_1256); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.common.util.EMap")); stringBuffer.append(TEXT_1257); stringBuffer.append(genFeature.getImportedMapTemplateArguments(genClass)); stringBuffer.append(TEXT_1258); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1259); <MASK>}</MASK> else { stringBuffer.append(TEXT_1260); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); stringBuffer.append(TEXT_1261); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1262); <MASK>}</MASK> <MASK>}</MASK> else { stringBuffer.append(TEXT_1263); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1264); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1265); stringBuffer.append(genModel.getImportedName("java.util.Collection")); if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { stringBuffer.append(TEXT_1266); stringBuffer.append(genFeature.getListItemType(genClass)); stringBuffer.append(TEXT_1267); <MASK>}</MASK> stringBuffer.append(TEXT_1268); <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1269); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1270); stringBuffer.append(genFeature.getObjectType(genClass)); stringBuffer.append(TEXT_1271); stringBuffer.append(genFeature.getPrimitiveValueFunction()); stringBuffer.append(TEXT_1272); <MASK>}</MASK> else { stringBuffer.append(TEXT_1273); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1274); if (genFeature.getTypeGenDataType() == null || !genFeature.getTypeGenDataType().isObjectType() || !genFeature.getRawType().equals(genFeature.getType(genClass))) { stringBuffer.append(TEXT_1275); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1276); <MASK>}</MASK> stringBuffer.append(TEXT_1277); <MASK>}</MASK> stringBuffer.append(TEXT_1278); <MASK>}</MASK> stringBuffer.append(TEXT_1279); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1280); <MASK>}</MASK> else { stringBuffer.append(TEXT_1281); <MASK>}</MASK> stringBuffer.append(TEXT_1282); <MASK>}</MASK> if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEUnsetGenFeatures())) { stringBuffer.append(TEXT_1283); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1284); <MASK>}</MASK> stringBuffer.append(TEXT_1285); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1286); for (GenFeature genFeature : genClass.getEUnsetGenFeatures()) { stringBuffer.append(TEXT_1287); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1288); if (genFeature.isListType() && !genFeature.isUnsettable()) { if (genFeature.isWrappedFeatureMapType()) { stringBuffer.append(TEXT_1289); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1290); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1291); <MASK>}</MASK> else { stringBuffer.append(TEXT_1292); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1293); <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.isUnsettable()) { stringBuffer.append(TEXT_1294); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1295); <MASK>}</MASK> else if (!genFeature.hasEDefault()) { stringBuffer.append(TEXT_1296); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1297); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1298); <MASK>}</MASK> else { stringBuffer.append(TEXT_1299); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1300); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1301); <MASK>}</MASK> stringBuffer.append(TEXT_1302); <MASK>}</MASK> stringBuffer.append(TEXT_1303); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1304); <MASK>}</MASK> else { stringBuffer.append(TEXT_1305); <MASK>}</MASK> stringBuffer.append(TEXT_1306); //Class/eUnset.override.javajetinc <MASK>}</MASK> if (isImplementation && !genModel.isReflectiveDelegation() && genClass.implementsAny(genClass.getEIsSetGenFeatures())) { stringBuffer.append(TEXT_1307); if (genModel.useGenerics()) { for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) { if (genFeature.isListType() && !genFeature.isUnsettable() && !genFeature.isWrappedFeatureMapType() && !genClass.isField(genFeature) && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1308); break; <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1309); <MASK>}</MASK> stringBuffer.append(TEXT_1310); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1311); for (GenFeature genFeature : genClass.getEIsSetGenFeatures()) { stringBuffer.append(TEXT_1312); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1313); if (genFeature.isListType() && !genFeature.isUnsettable()) { if (genFeature.isWrappedFeatureMapType()) { if (genFeature.isVolatile()) { stringBuffer.append(TEXT_1314); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.util.FeatureMap")); stringBuffer.append(TEXT_1315); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1316); <MASK>}</MASK> else { stringBuffer.append(TEXT_1317); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1318); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1319); <MASK>}</MASK> <MASK>}</MASK> else { if (genClass.isField(genFeature)) { stringBuffer.append(TEXT_1320); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1321); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1322); <MASK>}</MASK> else { if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1323); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1324); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1325); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1326); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1327); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1328); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1329); <MASK>}</MASK> else { stringBuffer.append(TEXT_1330); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1331); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.isUnsettable()) { stringBuffer.append(TEXT_1332); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1333); <MASK>}</MASK> else if (genFeature.isResolveProxies()) { if (genClass.isField(genFeature)) { stringBuffer.append(TEXT_1334); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1335); <MASK>}</MASK> else { if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1336); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1337); <MASK>}</MASK> else { stringBuffer.append(TEXT_1338); stringBuffer.append(genFeature.getAccessorName()); stringBuffer.append(TEXT_1339); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> else if (!genFeature.hasEDefault()) { if (genClass.isField(genFeature)) { stringBuffer.append(TEXT_1340); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1341); <MASK>}</MASK> else { if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1342); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1343); <MASK>}</MASK> else { stringBuffer.append(TEXT_1344); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1345); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> else if (genFeature.isPrimitiveType() || genFeature.isEnumType()) { if (genClass.isField(genFeature)) { if (genClass.isFlag(genFeature)) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_1346); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_1347); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1348); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1349); <MASK>}</MASK> else { stringBuffer.append(TEXT_1350); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_1351); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1352); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1353); <MASK>}</MASK> <MASK>}</MASK> else { stringBuffer.append(TEXT_1354); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1355); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1356); <MASK>}</MASK> <MASK>}</MASK> else { if (genFeature.isEnumType() && genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1357); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1358); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1359); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1360); <MASK>}</MASK> else { stringBuffer.append(TEXT_1361); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1362); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1363); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> else {//datatype if (genClass.isField(genFeature)) { stringBuffer.append(TEXT_1364); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1365); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1366); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1367); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1368); <MASK>}</MASK> else { if (genFeature.isField() && genClass.getImplementingGenModel(genFeature).isVirtualDelegation()) { stringBuffer.append(TEXT_1369); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1370); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1371); stringBuffer.append(genFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1372); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1373); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1374); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1375); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1376); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1377); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1378); <MASK>}</MASK> else { stringBuffer.append(TEXT_1379); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1380); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1381); stringBuffer.append(genFeature.getEDefault()); stringBuffer.append(TEXT_1382); stringBuffer.append(genFeature.getGetAccessor()); stringBuffer.append(TEXT_1383); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> stringBuffer.append(TEXT_1384); if (genModel.isMinimalReflectiveMethods()) { stringBuffer.append(TEXT_1385); <MASK>}</MASK> else { stringBuffer.append(TEXT_1386); <MASK>}</MASK> stringBuffer.append(TEXT_1387); //Class/eIsSet.override.javajetinc <MASK>}</MASK> if (isImplementation && (!genClass.getMixinGenFeatures().isEmpty() || genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty())) { if (!genClass.getMixinGenFeatures().isEmpty()) { stringBuffer.append(TEXT_1388); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1389); <MASK>}</MASK> stringBuffer.append(TEXT_1390); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_1391); for (GenClass mixinGenClass : genClass.getMixinGenClasses()) { stringBuffer.append(TEXT_1392); stringBuffer.append(mixinGenClass.getImportedInterfaceName()); stringBuffer.append(TEXT_1393); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1394); for (GenFeature genFeature : mixinGenClass.getGenFeatures()) { stringBuffer.append(TEXT_1395); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1396); stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1397); <MASK>}</MASK> stringBuffer.append(TEXT_1398); <MASK>}</MASK> stringBuffer.append(TEXT_1399); <MASK>}</MASK> stringBuffer.append(TEXT_1400); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1401); <MASK>}</MASK> stringBuffer.append(TEXT_1402); stringBuffer.append(singleWildcard); stringBuffer.append(TEXT_1403); for (GenClass mixinGenClass : genClass.getMixinGenClasses()) { stringBuffer.append(TEXT_1404); stringBuffer.append(mixinGenClass.getImportedInterfaceName()); stringBuffer.append(TEXT_1405); for (GenFeature genFeature : mixinGenClass.getGenFeatures()) { stringBuffer.append(TEXT_1406); stringBuffer.append(mixinGenClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1407); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1408); <MASK>}</MASK> stringBuffer.append(TEXT_1409); <MASK>}</MASK> if (genClass.hasOffsetCorrection() && !genClass.getGenFeatures().isEmpty()) { stringBuffer.append(TEXT_1410); stringBuffer.append(genClass.getImportedInterfaceName()); stringBuffer.append(TEXT_1411); stringBuffer.append(negativeOffsetCorrection); stringBuffer.append(TEXT_1412); for (GenFeature genFeature : genClass.getGenFeatures()) { stringBuffer.append(TEXT_1413); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(TEXT_1414); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1415); <MASK>}</MASK> stringBuffer.append(TEXT_1416); <MASK>}</MASK> stringBuffer.append(TEXT_1417); <MASK>}</MASK> if (isImplementation && genModel.isVirtualDelegation()) { String eVirtualValuesField = genClass.getEVirtualValuesField(); if (eVirtualValuesField != null) { stringBuffer.append(TEXT_1418); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1419); <MASK>}</MASK> stringBuffer.append(TEXT_1420); stringBuffer.append(eVirtualValuesField); stringBuffer.append(TEXT_1421); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1422); <MASK>}</MASK> stringBuffer.append(TEXT_1423); stringBuffer.append(eVirtualValuesField); stringBuffer.append(TEXT_1424); <MASK>}</MASK> { List<String> eVirtualIndexBitFields = genClass.getEVirtualIndexBitFields(new ArrayList<String>()); if (!eVirtualIndexBitFields.isEmpty()) { List<String> allEVirtualIndexBitFields = genClass.getAllEVirtualIndexBitFields(new ArrayList<String>()); stringBuffer.append(TEXT_1425); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1426); <MASK>}</MASK> stringBuffer.append(TEXT_1427); for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) { stringBuffer.append(TEXT_1428); stringBuffer.append(i); stringBuffer.append(TEXT_1429); stringBuffer.append(allEVirtualIndexBitFields.get(i)); stringBuffer.append(TEXT_1430); <MASK>}</MASK> stringBuffer.append(TEXT_1431); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1432); <MASK>}</MASK> stringBuffer.append(TEXT_1433); for (int i = 0; i < allEVirtualIndexBitFields.size(); i++) { stringBuffer.append(TEXT_1434); stringBuffer.append(i); stringBuffer.append(TEXT_1435); stringBuffer.append(allEVirtualIndexBitFields.get(i)); stringBuffer.append(TEXT_1436); <MASK>}</MASK> stringBuffer.append(TEXT_1437); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> if (isImplementation && !genModel.isReflectiveDelegation() && !genClass.getToStringGenFeatures().isEmpty()) { stringBuffer.append(TEXT_1438); if (genModel.useClassOverrideAnnotation()) { stringBuffer.append(TEXT_1439); <MASK>}</MASK> stringBuffer.append(TEXT_1440); { boolean first = true; for (GenFeature genFeature : genClass.getToStringGenFeatures()) { if (first) { first = false; stringBuffer.append(TEXT_1441); stringBuffer.append(genFeature.getName()); stringBuffer.append(TEXT_1442); stringBuffer.append(genModel.getNonNLS()); <MASK>}</MASK> else { stringBuffer.append(TEXT_1443); stringBuffer.append(genFeature.getName()); stringBuffer.append(TEXT_1444); stringBuffer.append(genModel.getNonNLS()); <MASK>}</MASK> if (genFeature.isUnsettable() && !genFeature.isListType()) { if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1445); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1446); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); stringBuffer.append(TEXT_1447); stringBuffer.append(genModel.getNonNLS()); <MASK>}</MASK> else { if (genClass.isFlag(genFeature)) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_1448); if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_1449); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_1450); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1451); <MASK>}</MASK> else { stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_1452); <MASK>}</MASK> stringBuffer.append(TEXT_1453); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_1454); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1455); stringBuffer.append(genModel.getNonNLS()); <MASK>}</MASK> else { stringBuffer.append(TEXT_1456); if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_1457); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_1458); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1459); <MASK>}</MASK> else { stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_1460); <MASK>}</MASK> stringBuffer.append(TEXT_1461); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1462); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_1463); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1464); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1465); stringBuffer.append(genModel.getNonNLS()); <MASK>}</MASK> <MASK>}</MASK> else { stringBuffer.append(TEXT_1466); if (genClass.isESetFlag(genFeature)) { stringBuffer.append(TEXT_1467); stringBuffer.append(genClass.getESetFlagsField(genFeature)); stringBuffer.append(TEXT_1468); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1469); <MASK>}</MASK> else { stringBuffer.append(genFeature.getUncapName()); stringBuffer.append(TEXT_1470); <MASK>}</MASK> stringBuffer.append(TEXT_1471); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1472); stringBuffer.append(genModel.getNonNLS()); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> else { if (genModel.isVirtualDelegation() && !genFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1473); stringBuffer.append(genClass.getQualifiedFeatureID(genFeature)); stringBuffer.append(positiveOffsetCorrection); if (!genFeature.isListType() && !genFeature.isReferenceType()){ stringBuffer.append(TEXT_1474); stringBuffer.append(genFeature.getEDefault()); <MASK>}</MASK> stringBuffer.append(TEXT_1475); <MASK>}</MASK> else { if (genClass.isFlag(genFeature)) { if (genFeature.isBooleanType()) { stringBuffer.append(TEXT_1476); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_1477); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1478); <MASK>}</MASK> else { stringBuffer.append(TEXT_1479); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1480); stringBuffer.append(genClass.getFlagsField(genFeature)); stringBuffer.append(TEXT_1481); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1482); stringBuffer.append(genFeature.getUpperName()); stringBuffer.append(TEXT_1483); <MASK>}</MASK> <MASK>}</MASK> else { stringBuffer.append(TEXT_1484); stringBuffer.append(genFeature.getSafeName()); stringBuffer.append(TEXT_1485); <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> <MASK>}</MASK> stringBuffer.append(TEXT_1486); <MASK>}</MASK> if (isImplementation && genClass.isMapEntry()) { GenFeature keyFeature = genClass.getMapEntryKeyFeature(); GenFeature valueFeature = genClass.getMapEntryValueFeature(); String objectType = genModel.getImportedName("java.lang.Object"); String keyType = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50 ? keyFeature.getObjectType(genClass) : objectType; String valueType = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50 ? valueFeature.getObjectType(genClass) : objectType; String eMapType = genModel.getImportedName("org.eclipse.emf.common.util.EMap") + (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50 ? "<" + keyType + ", " + valueType + ">" : ""); stringBuffer.append(TEXT_1487); stringBuffer.append(objectType); stringBuffer.append(TEXT_1488); stringBuffer.append(keyType); stringBuffer.append(TEXT_1489); if (keyFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1490); stringBuffer.append(keyFeature.getObjectType(genClass)); stringBuffer.append(TEXT_1491); <MASK>}</MASK> else { stringBuffer.append(TEXT_1492); <MASK>}</MASK> stringBuffer.append(TEXT_1493); stringBuffer.append(keyType); stringBuffer.append(TEXT_1494); if (keyFeature.isListType()) { stringBuffer.append(TEXT_1495); if (!genModel.useGenerics()) { stringBuffer.append(TEXT_1496); stringBuffer.append(genModel.getImportedName("java.util.Collection")); stringBuffer.append(TEXT_1497); <MASK>}</MASK> stringBuffer.append(TEXT_1498); <MASK>}</MASK> else if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { stringBuffer.append(TEXT_1499); <MASK>}</MASK> else if (keyFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1500); stringBuffer.append(keyFeature.getObjectType(genClass)); stringBuffer.append(TEXT_1501); stringBuffer.append(keyFeature.getPrimitiveValueFunction()); stringBuffer.append(TEXT_1502); <MASK>}</MASK> else { stringBuffer.append(TEXT_1503); stringBuffer.append(keyFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1504); <MASK>}</MASK> stringBuffer.append(TEXT_1505); stringBuffer.append(valueType); stringBuffer.append(TEXT_1506); if (valueFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1507); stringBuffer.append(valueFeature.getObjectType(genClass)); stringBuffer.append(TEXT_1508); <MASK>}</MASK> else { stringBuffer.append(TEXT_1509); <MASK>}</MASK> stringBuffer.append(TEXT_1510); stringBuffer.append(valueType); stringBuffer.append(TEXT_1511); stringBuffer.append(valueType); stringBuffer.append(TEXT_1512); stringBuffer.append(valueType); stringBuffer.append(TEXT_1513); if (valueFeature.isListType()) { stringBuffer.append(TEXT_1514); if (!genModel.useGenerics()) { stringBuffer.append(TEXT_1515); stringBuffer.append(genModel.getImportedName("java.util.Collection")); stringBuffer.append(TEXT_1516); <MASK>}</MASK> stringBuffer.append(TEXT_1517); <MASK>}</MASK> else if (genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50) { stringBuffer.append(TEXT_1518); <MASK>}</MASK> else if (valueFeature.isPrimitiveType()) { stringBuffer.append(TEXT_1519); stringBuffer.append(valueFeature.getObjectType(genClass)); stringBuffer.append(TEXT_1520); stringBuffer.append(valueFeature.getPrimitiveValueFunction()); stringBuffer.append(TEXT_1521); <MASK>}</MASK> else { stringBuffer.append(TEXT_1522); stringBuffer.append(valueFeature.getImportedType(genClass)); stringBuffer.append(TEXT_1523); <MASK>}</MASK> stringBuffer.append(TEXT_1524); if (genModel.useGenerics()) { stringBuffer.append(TEXT_1525); <MASK>}</MASK> stringBuffer.append(TEXT_1526); stringBuffer.append(eMapType); stringBuffer.append(TEXT_1527); stringBuffer.append(genModel.getImportedName("org.eclipse.emf.ecore.EObject")); stringBuffer.append(TEXT_1528); stringBuffer.append(eMapType); stringBuffer.append(TEXT_1529); <MASK>}</MASK> stringBuffer.append(TEXT_1530); stringBuffer.append(isInterface ? " " + genClass.getInterfaceName() : genClass.getClassName()); // TODO fix the space above genModel.emitSortedImports(); stringBuffer.append(TEXT_1531); return stringBuffer.toString(); <MASK>}</MASK>"
Inversion-Mutation
megadiff
"@Test public void createUuid() { UUID lastId = null; for (int i = 0; i < 10; i++) { UUID id = TimeUuid.getTimeUUID(); System.out.println(id); if (lastId != null) assertFalse(lastId.equals(id)); lastId = id; } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createUuid"
"@Test public void createUuid() { for (int i = 0; i < 10; i++) { UUID id = TimeUuid.getTimeUUID(); System.out.println(id); <MASK>UUID lastId = null;</MASK> if (lastId != null) assertFalse(lastId.equals(id)); lastId = id; } }"
Inversion-Mutation
megadiff
"private Uri uri() { return Uri.parse(String.format(URI_TEMPLATE, getText(R.string.host), getText(R.string.oauth_client_id), getText(R.string.data_scheme), getText(R.string.data_host), getText(R.string.data_path))); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "uri"
"private Uri uri() { return Uri.parse(String.format(URI_TEMPLATE, getText(R.string.host), getText(R.string.oauth_client_id), <MASK>getText(R.string.data_host),</MASK> getText(R.string.data_scheme), getText(R.string.data_path))); }"
Inversion-Mutation
megadiff
"@Override protected LinkedList<ItemDetailsMetadata> defineMetadatas(final IFlowNodeItem task) { final MetadataTaskBuilder metadatas = new MetadataTaskBuilder(); metadatas.addAppsName(); metadatas.addAppsVersion(); metadatas.addCaseId(task, true); metadatas.addType(); metadatas.addState(); metadatas.addPriority(); if (task.isHumanTask()) { metadatas.addAssignedTo(); if (isArchived()) { metadatas.addExecutedBy(); } } if (!(task.getRootContainerProcess().ensureName().equals(task.getProcess().ensureName()))){ metadatas.AddSubAppsName(); metadatas.AddSubAppsVersion(); } metadatas.addDueDate(getArchivedDateFormat()); metadatas.addLastUpdateDate(FORMAT.DISPLAY); metadatas.addAssignedDate(FORMAT.DISPLAY); return metadatas.build(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "defineMetadatas"
"@Override protected LinkedList<ItemDetailsMetadata> defineMetadatas(final IFlowNodeItem task) { final MetadataTaskBuilder metadatas = new MetadataTaskBuilder(); <MASK>metadatas.addCaseId(task, true);</MASK> metadatas.addAppsName(); metadatas.addAppsVersion(); metadatas.addType(); metadatas.addState(); metadatas.addPriority(); if (task.isHumanTask()) { metadatas.addAssignedTo(); if (isArchived()) { metadatas.addExecutedBy(); } } if (!(task.getRootContainerProcess().ensureName().equals(task.getProcess().ensureName()))){ metadatas.AddSubAppsName(); metadatas.AddSubAppsVersion(); } metadatas.addDueDate(getArchivedDateFormat()); metadatas.addLastUpdateDate(FORMAT.DISPLAY); metadatas.addAssignedDate(FORMAT.DISPLAY); return metadatas.build(); }"
Inversion-Mutation
megadiff
"float[] getLongitudes(DataRenderer renderer, boolean bulk) throws VisADException { any_longitude_rotate = false; longitude_map = null; longitude_axis = -1; longitude_cs = null; longitude_coords = null; Vector mapVector = renderer.getDisplay().getMapVector(); Enumeration maps = mapVector.elements(); while(maps.hasMoreElements()) { ScalarMap map = (ScalarMap) maps.nextElement(); DisplayRealType dreal = map.getDisplayScalar(); DisplayTupleType tuple = dreal.getTuple(); if (!RealType.Longitude.equals(map.getScalar())) continue; // getCircular() true for Latitude, Longitude, CylAzimuth, etc if (dreal.getCircular()) return null; // do nothing! if (tuple != null && (tuple.equals(Display.DisplaySpatialCartesianTuple) || (tuple.getCoordinateSystem() != null && tuple.getCoordinateSystem().getReference().equals( Display.DisplaySpatialCartesianTuple)))) { // spatial // System.out.println("getLongitudes: found a map from Longitude to a spatial axis"); // have found a map from Longitude to a spatial DisplayRealType // other than Longitude or CylAzimuth double[] map_range = map.getRange(); float map_min = (float) map_range[0]; float map_max = (float) map_range[1]; // System.out.println("map = " + map); // System.out.println("map_min = " + map_min + " map_max = " + map_max); // leave some information for getLongitudeRange longitude_map = map; longitude_axis = dreal.getTupleIndex(); longitude_cs = tuple.getCoordinateSystem(); // may be null float[] lons = null; if (longitude_cs == null) { lons = new float[vertexCount]; for (int i=0; i<vertexCount; i++) { lons[i] = coordinates[3 * i + longitude_axis]; } } else { float[][] coords = new float[3][vertexCount]; int k = 0; for (int i=0; i<vertexCount; i++) { coords[0][i] = coordinates[k++]; coords[1][i] = coordinates[k++]; coords[2][i] = coordinates[k++]; } longitude_coords = longitude_cs.fromReference(coords); lons = longitude_coords[longitude_axis]; } lons = longitude_map.inverseScaleValues(lons); // get range of Longitude values float lon_min = Float.MAX_VALUE; // float lon_max = Float.MIN_VALUE; float lon_max = -Float.MAX_VALUE; for (int i=0; i<vertexCount; i++) { if (lons[i] == lons[i]) { // System.out.println("lons[" + i + "] = " + lons[i]); if (lons[i] < lon_min) lon_min = lons[i]; if (lons[i] > lon_max) lon_max = lons[i]; } } // System.out.println("lon_min = " + lon_min + " lon_max = " + lon_max); if (lon_min == Float.MAX_VALUE) { longitude_coords = null; return lons; } boolean any_rotate = false; if (map_min == map_min && map_max == map_max) { float map_delta = 0.1f * (map_max - map_min); // System.out.println("map_delta = " + map_delta); if ( ((map_min + map_delta) < lon_min && (map_max + map_delta) < lon_max) || (lon_min < (map_min - map_delta) && lon_max < (map_max - map_delta)) ) { float new_lon_min = rotateOneLongitude(lon_min, map_min); float new_lon_max = rotateOneLongitude(lon_max, map_min); float dist_min = (lon_min < map_min) ? (map_min - lon_min) : (map_max < lon_min) ? (lon_min - map_max) : 0.0f; float new_dist_min = (new_lon_min < map_min) ? (map_min - new_lon_min) : (map_max < new_lon_min) ? (new_lon_min - map_max) : 0.0f; float dist_max = (lon_max < map_min) ? (map_min - lon_max) : (map_max < lon_max) ? (lon_max - map_max) : 0.0f; float new_dist_max = (new_lon_max < map_min) ? (map_min - new_lon_max) : (map_max < new_lon_max) ? (new_lon_max - map_max) : 0.0f; if ((new_dist_min + new_dist_max) < (dist_min + dist_max)) { // actual longitudes are shifted significantly from map, // so rotate longitudes to base at map_min // System.out.println("rotateLongitudes to map_min " + map_min); any_rotate = true; rotateLongitudes(lons, map_min, bulk); } } } if (!any_rotate && (lon_min + 360.0f) < lon_max) { // System.out.println("rotateLongitudes to lon_min " + lon_min); rotateLongitudes(lons, lon_min, bulk); } /* for (int i=0; i<vertexCount; i++) { System.out.println("return lons[" + i + "] = " + lons[i]); } */ longitude_coords = null; return lons; } // end if (tuple != null && ... } // end while(maps.hasMoreElements()) int[] indices = renderer.getLatLonIndices(); if (indices[0] < 0 || indices[1] < 0) return null; float[][] locs = new float[3][vertexCount]; int k = 0; for (int i=0; i<vertexCount; i++) { locs[0][i] = coordinates[k++]; locs[1][i] = coordinates[k++]; locs[2][i] = coordinates[k++]; } float[][] latlons = renderer.earthToSpatial(locs, null); longitude_coords = null; return latlons[1]; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getLongitudes"
"float[] getLongitudes(DataRenderer renderer, boolean bulk) throws VisADException { any_longitude_rotate = false; longitude_map = null; longitude_axis = -1; longitude_cs = null; longitude_coords = null; Vector mapVector = renderer.getDisplay().getMapVector(); Enumeration maps = mapVector.elements(); while(maps.hasMoreElements()) { ScalarMap map = (ScalarMap) maps.nextElement(); DisplayRealType dreal = map.getDisplayScalar(); DisplayTupleType tuple = dreal.getTuple(); if (!RealType.Longitude.equals(map.getScalar())) continue; // getCircular() true for Latitude, Longitude, CylAzimuth, etc if (dreal.getCircular()) return null; // do nothing! if (tuple != null && (tuple.equals(Display.DisplaySpatialCartesianTuple) || (tuple.getCoordinateSystem() != null && tuple.getCoordinateSystem().getReference().equals( Display.DisplaySpatialCartesianTuple)))) { // spatial // System.out.println("getLongitudes: found a map from Longitude to a spatial axis"); // have found a map from Longitude to a spatial DisplayRealType // other than Longitude or CylAzimuth double[] map_range = map.getRange(); float map_min = (float) map_range[0]; float map_max = (float) map_range[1]; // System.out.println("map = " + map); // System.out.println("map_min = " + map_min + " map_max = " + map_max); // leave some information for getLongitudeRange longitude_map = map; longitude_axis = dreal.getTupleIndex(); longitude_cs = tuple.getCoordinateSystem(); // may be null float[] lons = null; if (longitude_cs == null) { for (int i=0; i<vertexCount; i++) { <MASK>lons = new float[vertexCount];</MASK> lons[i] = coordinates[3 * i + longitude_axis]; } } else { float[][] coords = new float[3][vertexCount]; int k = 0; for (int i=0; i<vertexCount; i++) { coords[0][i] = coordinates[k++]; coords[1][i] = coordinates[k++]; coords[2][i] = coordinates[k++]; } longitude_coords = longitude_cs.fromReference(coords); lons = longitude_coords[longitude_axis]; } lons = longitude_map.inverseScaleValues(lons); // get range of Longitude values float lon_min = Float.MAX_VALUE; // float lon_max = Float.MIN_VALUE; float lon_max = -Float.MAX_VALUE; for (int i=0; i<vertexCount; i++) { if (lons[i] == lons[i]) { // System.out.println("lons[" + i + "] = " + lons[i]); if (lons[i] < lon_min) lon_min = lons[i]; if (lons[i] > lon_max) lon_max = lons[i]; } } // System.out.println("lon_min = " + lon_min + " lon_max = " + lon_max); if (lon_min == Float.MAX_VALUE) { longitude_coords = null; return lons; } boolean any_rotate = false; if (map_min == map_min && map_max == map_max) { float map_delta = 0.1f * (map_max - map_min); // System.out.println("map_delta = " + map_delta); if ( ((map_min + map_delta) < lon_min && (map_max + map_delta) < lon_max) || (lon_min < (map_min - map_delta) && lon_max < (map_max - map_delta)) ) { float new_lon_min = rotateOneLongitude(lon_min, map_min); float new_lon_max = rotateOneLongitude(lon_max, map_min); float dist_min = (lon_min < map_min) ? (map_min - lon_min) : (map_max < lon_min) ? (lon_min - map_max) : 0.0f; float new_dist_min = (new_lon_min < map_min) ? (map_min - new_lon_min) : (map_max < new_lon_min) ? (new_lon_min - map_max) : 0.0f; float dist_max = (lon_max < map_min) ? (map_min - lon_max) : (map_max < lon_max) ? (lon_max - map_max) : 0.0f; float new_dist_max = (new_lon_max < map_min) ? (map_min - new_lon_max) : (map_max < new_lon_max) ? (new_lon_max - map_max) : 0.0f; if ((new_dist_min + new_dist_max) < (dist_min + dist_max)) { // actual longitudes are shifted significantly from map, // so rotate longitudes to base at map_min // System.out.println("rotateLongitudes to map_min " + map_min); any_rotate = true; rotateLongitudes(lons, map_min, bulk); } } } if (!any_rotate && (lon_min + 360.0f) < lon_max) { // System.out.println("rotateLongitudes to lon_min " + lon_min); rotateLongitudes(lons, lon_min, bulk); } /* for (int i=0; i<vertexCount; i++) { System.out.println("return lons[" + i + "] = " + lons[i]); } */ longitude_coords = null; return lons; } // end if (tuple != null && ... } // end while(maps.hasMoreElements()) int[] indices = renderer.getLatLonIndices(); if (indices[0] < 0 || indices[1] < 0) return null; float[][] locs = new float[3][vertexCount]; int k = 0; for (int i=0; i<vertexCount; i++) { locs[0][i] = coordinates[k++]; locs[1][i] = coordinates[k++]; locs[2][i] = coordinates[k++]; } float[][] latlons = renderer.earthToSpatial(locs, null); longitude_coords = null; return latlons[1]; }"
Inversion-Mutation
megadiff
"@Override public void run(Server server, Essentials parent, CommandSender sender, String commandLabel, String[] args) throws Exception { if (args.length < 1 || args.length > 2) { sender.sendMessage("Usage: /" + commandLabel + " [player] [jailname]"); return; } User p; try { p = User.get(server.matchPlayer(args[0]).get(0)); } catch (Exception ex) { sender.sendMessage("§cThat player does not exist."); return; } if (p.isOp() || p.isAuthorized("essentials.jail.exempt")) { sender.sendMessage("§cYou may not jail that person"); return; } if (args.length == 2 && !p.isJailed()) { User.charge(sender, this); sender.sendMessage("§7Player " + p.getName() + " " + (p.toggleJailed() ? "jailed." : "unjailed.")); p.sendMessage("§7You have been jailed"); Essentials.getJail().sendToJail(p, args[1]); p.currentJail = (args[1]); return; } if (args.length == 2 && p.isJailed() && !args[1].equalsIgnoreCase(p.currentJail)) { sender.sendMessage("§cPerson is already in jail "+ p.currentJail); return; } if (args.length == 1 || (args.length == 2 && args[1].equalsIgnoreCase(p.currentJail))) { if (!p.isJailed()) { sender.sendMessage("Usage: /" + commandLabel + " [player] [jailname]"); return; } sender.sendMessage("§7Player " + p.getName() + " " + (p.toggleJailed() ? "jailed." : "unjailed.")); p.sendMessage("§7You have been released"); p.currentJail = ""; p.teleportBack(); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"@Override public void run(Server server, Essentials parent, CommandSender sender, String commandLabel, String[] args) throws Exception { if (args.length < 1 || args.length > 2) { sender.sendMessage("Usage: /" + commandLabel + " [player] [jailname]"); return; } User p; try { p = User.get(server.matchPlayer(args[0]).get(0)); } catch (Exception ex) { sender.sendMessage("§cThat player does not exist."); return; } if (p.isOp() || p.isAuthorized("essentials.jail.exempt")) { sender.sendMessage("§cYou may not jail that person"); return; } if (args.length == 2 && !p.isJailed()) { User.charge(sender, this); sender.sendMessage("§7Player " + p.getName() + " " + (p.toggleJailed() ? "jailed." : "unjailed.")); p.sendMessage("§7You have been jailed"); Essentials.getJail().sendToJail(p, args[1]); p.currentJail = (args[1]); return; } if (args.length == 2 && p.isJailed() && !args[1].equalsIgnoreCase(p.currentJail)) { sender.sendMessage("§cPerson is already in jail "+ p.currentJail); return; } if (args.length == 1 || (args.length == 2 && args[1].equalsIgnoreCase(p.currentJail))) { if (!p.isJailed()) { sender.sendMessage("Usage: /" + commandLabel + " [player] [jailname]"); return; } sender.sendMessage("§7Player " + p.getName() + " " + (p.toggleJailed() ? "jailed." : "unjailed.")); p.sendMessage("§7You have been released"); <MASK>p.teleportBack();</MASK> p.currentJail = ""; } }"
Inversion-Mutation
megadiff
"@Override public void run() { while (!Thread.interrupted()) { // waiting blocking for next job to execute try { currentJob = jobQueue.take(); currentJobLock.lock(); // execute job if (log.isDebugEnabled()) { log.debug("{} => Sending to node with request ID {}: {}", new Object[]{ nodeUrn, currentJob.requestId, toPrintableString(currentJob.buffer.array(), 200) } ); } deviceAdapter.sendToNode(currentJob.buffer); log.debug("{} => Waiting for node to answer to job with request ID {}", nodeUrn, currentJob.requestId ); boolean timeout = !currentJobDone.await(defaultTimeout, defaultTimeUnit); log.debug("{} => Job with request ID {} done (timeout={}, success={}).", new Object[]{ nodeUrn, currentJob.requestId, !timeout, currentJobResult != null && currentJobResult.isSuccessful() } ); if (timeout) { currentJob.future.setException(new TimeoutException()); } else { currentJob.future.set(currentJobResult); } } catch (InterruptedException e) { log.trace("{} => Interrupted while waiting for job to be done." + " This is propably OK as it should only happen during shutdown.", nodeUrn ); } finally { currentJobLock.unlock(); } } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"@Override public void run() { while (!Thread.interrupted()) { // waiting blocking for next job to execute try { <MASK>currentJobLock.lock();</MASK> currentJob = jobQueue.take(); // execute job if (log.isDebugEnabled()) { log.debug("{} => Sending to node with request ID {}: {}", new Object[]{ nodeUrn, currentJob.requestId, toPrintableString(currentJob.buffer.array(), 200) } ); } deviceAdapter.sendToNode(currentJob.buffer); log.debug("{} => Waiting for node to answer to job with request ID {}", nodeUrn, currentJob.requestId ); boolean timeout = !currentJobDone.await(defaultTimeout, defaultTimeUnit); log.debug("{} => Job with request ID {} done (timeout={}, success={}).", new Object[]{ nodeUrn, currentJob.requestId, !timeout, currentJobResult != null && currentJobResult.isSuccessful() } ); if (timeout) { currentJob.future.setException(new TimeoutException()); } else { currentJob.future.set(currentJobResult); } } catch (InterruptedException e) { log.trace("{} => Interrupted while waiting for job to be done." + " This is propably OK as it should only happen during shutdown.", nodeUrn ); } finally { currentJobLock.unlock(); } } }"
Inversion-Mutation
megadiff
"private String filter(String in) { String out = (String)recent.get(in); if (out == null) { out = stdTermFilter.filter(in); // Next, ignore accents. String tmp; if (accentMap != null) { tmp = accentMap.mapWord(out); if (tmp != null) out = tmp; } // Then ignore plurals. if (pluralMap != null) { tmp = pluralMap.lookup(out); if (tmp != null) out = tmp; recent.put(in, out); } } return out; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "filter"
"private String filter(String in) { String out = (String)recent.get(in); if (out == null) { out = stdTermFilter.filter(in); // Next, ignore accents. String tmp; if (accentMap != null) { tmp = accentMap.mapWord(out); if (tmp != null) out = tmp; } // Then ignore plurals. <MASK>tmp = pluralMap.lookup(out);</MASK> if (pluralMap != null) { if (tmp != null) out = tmp; recent.put(in, out); } } return out; }"
Inversion-Mutation
megadiff
"public void run() { finished = producer.isFinished(); while (running && !finished) { try { logger.debug("Calling produce method for producer " + producer); T obj = producer.produce(); logger.debug("Putting a new message in the queue for the object " + obj); queue.put(new QueueMessage<T>(obj)); } catch (InterruptedException e) { logger.debug("Producer thread interrupted"); } catch (RuntimeException e) { logger.error("Producer threw an Exception", e); } finished = producer.isFinished(); } running = false; if (finished) { logger.debug("Producer " + producer + " finished"); producerFinished(this); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run"
"public void run() { <MASK>finished = producer.isFinished();</MASK> while (running && !finished) { try { logger.debug("Calling produce method for producer " + producer); T obj = producer.produce(); logger.debug("Putting a new message in the queue for the object " + obj); queue.put(new QueueMessage<T>(obj)); <MASK>finished = producer.isFinished();</MASK> } catch (InterruptedException e) { logger.debug("Producer thread interrupted"); } catch (RuntimeException e) { logger.error("Producer threw an Exception", e); } } running = false; if (finished) { logger.debug("Producer " + producer + " finished"); producerFinished(this); } }"
Inversion-Mutation
megadiff
"@Override public void seek(long mills) { mTimer.update(mills); reset(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "seek"
"@Override public void seek(long mills) { <MASK>reset();</MASK> mTimer.update(mills); }"
Inversion-Mutation
megadiff
"@ARule( sa = 14, desc = "Check if used types/elements/messages have conflicting definitions", author = "michal.chmielewski@oracle.com", date = "02/10/2007", tag = "pass2", order = 300 ) // https://issues.jboss.org/browse/JBIDE-8088 // implemented missing code public void CheckReferencedTypes () { IProblem problem; Process process = (Process) mModelQuery.lookupProcess(mNode); for(INode node : fTypeToCheckList) { List<Import> conflicts = mModelQuery.findConflictingXSD(process, node); if (conflicts!=null) { String conflicting = null; for (int i=1; i<conflicts.size(); ++i) { if (conflicting == null) conflicting = conflicts.get(i).getLocation(); else conflicting += ", " + conflicts.get(i).getLocation(); } problem = createError(node); problem.fill("BPELC_XSD__CONFLICTING_DEFINITION", node.getAttribute(AT_NAME), conflicts.get(0).getLocation(), conflicting ); } } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "CheckReferencedTypes"
"@ARule( sa = 14, desc = "Check if used types/elements/messages have conflicting definitions", author = "michal.chmielewski@oracle.com", date = "02/10/2007", tag = "pass2", order = 300 ) // https://issues.jboss.org/browse/JBIDE-8088 // implemented missing code public void CheckReferencedTypes () { IProblem problem; for(INode node : fTypeToCheckList) { <MASK>Process process = (Process) mModelQuery.lookupProcess(mNode);</MASK> List<Import> conflicts = mModelQuery.findConflictingXSD(process, node); if (conflicts!=null) { String conflicting = null; for (int i=1; i<conflicts.size(); ++i) { if (conflicting == null) conflicting = conflicts.get(i).getLocation(); else conflicting += ", " + conflicts.get(i).getLocation(); } problem = createError(node); problem.fill("BPELC_XSD__CONFLICTING_DEFINITION", node.getAttribute(AT_NAME), conflicts.get(0).getLocation(), conflicting ); } } }"
Inversion-Mutation
megadiff
"public void sychronizeBuildNumber() throws Exception { nextUpStreamBuildNumber=setNextDownStreamBuildNumber(upstrambuild); List<AbstractProject> downStreamProjects = getDownStreamProjects(); for (AbstractProject downstreamProject : downStreamProjects) { downstreamProjectClear(nextUpStreamBuildNumber,downstreamProject); // reset the build number of downstream, may be problem in high version hudson downstreamProject.onCopiedFrom(null); downstreamProject.save(); downstreamProject.updateNextBuildNumber(nextUpStreamBuildNumber); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "sychronizeBuildNumber"
"public void sychronizeBuildNumber() throws Exception { nextUpStreamBuildNumber=setNextDownStreamBuildNumber(upstrambuild); List<AbstractProject> downStreamProjects = getDownStreamProjects(); for (AbstractProject downstreamProject : downStreamProjects) { downstreamProjectClear(nextUpStreamBuildNumber,downstreamProject); <MASK>downstreamProject.updateNextBuildNumber(nextUpStreamBuildNumber);</MASK> // reset the build number of downstream, may be problem in high version hudson downstreamProject.onCopiedFrom(null); downstreamProject.save(); } }"
Inversion-Mutation
megadiff
"protected void showAttendanceDetails( Cursor[] result ) { Cursor att = result[ 1 ]; if ( att.moveToFirst() ) { LinearLayout layout = (LinearLayout) mMainLayout.findViewById( R.id.attendance_content_layout ); do { String schedule = att.getString( att.getColumnIndex( Attendance.ATTENDANCE_SCHEDULE ) ); String[] parts = schedule.split( "/" ); if ( parts.length == 3 ) { addSpacing( layout ); TableLayout table = (TableLayout) mInflater.inflate( R.layout.attendance_detail_item, null ); addRow( table, "Months", parts[ 0 ] ); addSeparator( table ); addRow( table, "Days", parts[ 1 ] ); addSeparator( table ); addRow( table, "Hours", parts[ 2 ] ); layout.addView( table, 1, new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT ) ); } } while ( att.moveToNext() ); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "showAttendanceDetails"
"protected void showAttendanceDetails( Cursor[] result ) { Cursor att = result[ 1 ]; if ( att.moveToFirst() ) { LinearLayout layout = (LinearLayout) mMainLayout.findViewById( R.id.attendance_content_layout ); do { String schedule = att.getString( att.getColumnIndex( Attendance.ATTENDANCE_SCHEDULE ) ); String[] parts = schedule.split( "/" ); if ( parts.length == 3 ) { TableLayout table = (TableLayout) mInflater.inflate( R.layout.attendance_detail_item, null ); addRow( table, "Months", parts[ 0 ] ); addSeparator( table ); addRow( table, "Days", parts[ 1 ] ); addSeparator( table ); addRow( table, "Hours", parts[ 2 ] ); layout.addView( table, 1, new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT ) ); <MASK>addSpacing( layout );</MASK> } } while ( att.moveToNext() ); } }"
Inversion-Mutation
megadiff
"public Pagination() { paginationDiv.setStyle(Bootstrap.Pagination.LEFT); paginationDiv.add(list); initWidget(paginationDiv); setSize(PaginationSize.NORMAL); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Pagination"
"public Pagination() { paginationDiv.setStyle(Bootstrap.Pagination.LEFT); paginationDiv.add(list); <MASK>setSize(PaginationSize.NORMAL);</MASK> initWidget(paginationDiv); }"
Inversion-Mutation
megadiff
"public EaterControl() { initSoar(); generatePaths(); genMap(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "EaterControl"
"public EaterControl() { <MASK>generatePaths();</MASK> initSoar(); genMap(); }"
Inversion-Mutation
megadiff
"@Test public void selectCorrectAnswer_No_Loop__No_onChoose() { // GIVEN: initTestMission("No_Loop__No_onChoose"); // WHEN: clickOnAnswerButton(FIRST_RIGHT_ANSWER); // THEN: shouldBeInMode(MODE_REPLY_TO_CORRECT_ANSWER); shouldHaveTriggeredEvents("onStart", "onSuccess"); should_NOT_HaveTriggeredEvents("onFail", "onEnd"); shouldShowText(DEFAULT_RESPONSE_ON_CORRECT_ANSWER); shouldShowProceedButton(); historyListShouldHaveLength(2); lastItemInHistoryShouldBe(TextItem.class, TextType.REACTION_ON_CORRECT); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "selectCorrectAnswer_No_Loop__No_onChoose"
"@Test public void selectCorrectAnswer_No_Loop__No_onChoose() { // GIVEN: initTestMission("No_Loop__No_onChoose"); // WHEN: clickOnAnswerButton(FIRST_RIGHT_ANSWER); // THEN: shouldBeInMode(MODE_REPLY_TO_CORRECT_ANSWER); shouldHaveTriggeredEvents("onStart", "onSuccess"); should_NOT_HaveTriggeredEvents("onFail", "onEnd"); shouldShowText(DEFAULT_RESPONSE_ON_CORRECT_ANSWER); shouldShowProceedButton(); lastItemInHistoryShouldBe(TextItem.class, TextType.REACTION_ON_CORRECT); <MASK>historyListShouldHaveLength(2);</MASK> }"
Inversion-Mutation
megadiff
"public void testStartsPipelineWithSpecificSynchronizerRequested() throws InterruptedException { ConfigManager configManager = EasyMock.createNiceMock(ConfigManager.class); GroningenConfig config = EasyMock.createNiceMock(GroningenConfig.class); GroningenParams paramBlock = GroningenParams.newBuilder() .setPipelineSyncType(GroningenParams.PipelineSynchMode.ITERATION_FINALIZATION_ONLY) .build(); final PipelineSynchronizer finalizationSynchronizer = new IterationFinalizationSynchronizer(); Provider<PipelineSynchronizer> localSynchronizerProvider = new Provider<PipelineSynchronizer>() { @Override public PipelineSynchronizer get() { return finalizationSynchronizer; } }; pipelineSyncProviderMap.put( PipelineSynchMode.ITERATION_FINALIZATION_ONLY, localSynchronizerProvider); EasyMock.expect(configManager.queryConfig()).andReturn(config).anyTimes(); EasyMock.expect(config.getParamBlock()).andReturn(paramBlock); PipelineId referenceId = new PipelineId("pipelineid"); EasyMock.expect( pipelineIdGeneratorMock.generatePipelineId(EasyMock.anyObject(GroningenConfig.class))). andReturn(referenceId); BlockScope localPipelineScope = EasyMock.createMock(BlockScope.class); localPipelineScope.enter(); localPipelineScope.seed(PipelineSynchronizer.class, finalizationSynchronizer); localPipelineScope.seed(PipelineId.class, referenceId); localPipelineScope.seed(ConfigManager.class, configManager); localPipelineScope.seed( EasyMock.same(PipelineStageInfo.class), EasyMock.anyObject(PipelineStageInfo.class)); final ReentrantLock lock = new ReentrantLock(); pipelineMock.run(); localPipelineScope.exit(); EasyMock.expectLastCall().andAnswer(new IAnswer<Void>() { @Override public Void answer() throws Throwable { // Pausing pipeline until main thread explicitly unlocks the lock lock.lock(); lock.unlock(); return null; }}); EasyMock.replay(configManager, config, pipelineMock, pipelineIdGeneratorMock, localPipelineScope); pipelineManager = new PipelineManager(pipelineIdGeneratorMock, localPipelineScope, pipelineProvider, dataStoreMock, pipelineSyncProviderMap); lock.lock(); try { PipelineId id = pipelineManager.startPipeline(configManager, false); Thread.sleep(500); assertNotNull(pipelineManager.findPipelineById(id)); } finally { lock.unlock(); } EasyMock.verify(localPipelineScope); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testStartsPipelineWithSpecificSynchronizerRequested"
"public void testStartsPipelineWithSpecificSynchronizerRequested() throws InterruptedException { ConfigManager configManager = EasyMock.createNiceMock(ConfigManager.class); GroningenConfig config = EasyMock.createNiceMock(GroningenConfig.class); GroningenParams paramBlock = GroningenParams.newBuilder() .setPipelineSyncType(GroningenParams.PipelineSynchMode.ITERATION_FINALIZATION_ONLY) .build(); final PipelineSynchronizer finalizationSynchronizer = new IterationFinalizationSynchronizer(); Provider<PipelineSynchronizer> localSynchronizerProvider = new Provider<PipelineSynchronizer>() { @Override public PipelineSynchronizer get() { return finalizationSynchronizer; } }; pipelineSyncProviderMap.put( PipelineSynchMode.ITERATION_FINALIZATION_ONLY, localSynchronizerProvider); EasyMock.expect(configManager.queryConfig()).andReturn(config).anyTimes(); EasyMock.expect(config.getParamBlock()).andReturn(paramBlock); PipelineId referenceId = new PipelineId("pipelineid"); EasyMock.expect( pipelineIdGeneratorMock.generatePipelineId(EasyMock.anyObject(GroningenConfig.class))). andReturn(referenceId); BlockScope localPipelineScope = EasyMock.createMock(BlockScope.class); localPipelineScope.enter(); localPipelineScope.seed(PipelineSynchronizer.class, finalizationSynchronizer); localPipelineScope.seed(PipelineId.class, referenceId); localPipelineScope.seed(ConfigManager.class, configManager); localPipelineScope.seed( EasyMock.same(PipelineStageInfo.class), EasyMock.anyObject(PipelineStageInfo.class)); <MASK>localPipelineScope.exit();</MASK> final ReentrantLock lock = new ReentrantLock(); pipelineMock.run(); EasyMock.expectLastCall().andAnswer(new IAnswer<Void>() { @Override public Void answer() throws Throwable { // Pausing pipeline until main thread explicitly unlocks the lock lock.lock(); lock.unlock(); return null; }}); EasyMock.replay(configManager, config, pipelineMock, pipelineIdGeneratorMock, localPipelineScope); pipelineManager = new PipelineManager(pipelineIdGeneratorMock, localPipelineScope, pipelineProvider, dataStoreMock, pipelineSyncProviderMap); lock.lock(); try { PipelineId id = pipelineManager.startPipeline(configManager, false); Thread.sleep(500); assertNotNull(pipelineManager.findPipelineById(id)); } finally { lock.unlock(); } EasyMock.verify(localPipelineScope); }"
Inversion-Mutation
megadiff
"public Bitmap getBitmapWithFilterApplied(final Bitmap bitmap) { if (mGlSurfaceView != null) { mRenderer.deleteImage(); mRenderer.runOnDraw(new Runnable() { @Override public void run() { synchronized(mFilter) { mFilter.destroy(); mFilter.notify(); } } }); synchronized(mFilter) { requestRender(); try { mFilter.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } } GPUImageRenderer renderer = new GPUImageRenderer(mFilter); renderer.setRotation(Rotation.NORMAL, mRenderer.isFlippedHorizontally(), mRenderer.isFlippedVertically()); renderer.setScaleType(mScaleType); PixelBuffer buffer = new PixelBuffer(bitmap.getWidth(), bitmap.getHeight()); buffer.setRenderer(renderer); renderer.setImageBitmap(bitmap, false); Bitmap result = buffer.getBitmap(); mFilter.destroy(); renderer.deleteImage(); buffer.destroy(); mRenderer.setFilter(mFilter); if (mCurrentBitmap != null) { mRenderer.setImageBitmap(mCurrentBitmap, false); } requestRender(); return result; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getBitmapWithFilterApplied"
"public Bitmap getBitmapWithFilterApplied(final Bitmap bitmap) { if (mGlSurfaceView != null) { mRenderer.deleteImage(); mRenderer.runOnDraw(new Runnable() { @Override public void run() { synchronized(mFilter) { mFilter.destroy(); mFilter.notify(); } } }); <MASK>requestRender();</MASK> synchronized(mFilter) { try { mFilter.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } } GPUImageRenderer renderer = new GPUImageRenderer(mFilter); renderer.setRotation(Rotation.NORMAL, mRenderer.isFlippedHorizontally(), mRenderer.isFlippedVertically()); renderer.setScaleType(mScaleType); PixelBuffer buffer = new PixelBuffer(bitmap.getWidth(), bitmap.getHeight()); buffer.setRenderer(renderer); renderer.setImageBitmap(bitmap, false); Bitmap result = buffer.getBitmap(); mFilter.destroy(); renderer.deleteImage(); buffer.destroy(); mRenderer.setFilter(mFilter); if (mCurrentBitmap != null) { mRenderer.setImageBitmap(mCurrentBitmap, false); } <MASK>requestRender();</MASK> return result; }"
Inversion-Mutation
megadiff
"private void updateView() { Session session = Session.getActiveSession(); if (session.isOpened()) { showProfile(true); String userName = PreferenceHelper.getUserName(getActivity()); if (TextUtils.isEmpty(userName)) { // make request to the /me API Request.newMeRequest(session, new Request.GraphUserCallback() { // callback after Graph API response with user object @Override public void onCompleted(GraphUser user, Response response) { if (user != null) { PreferenceHelper.setUserId(getActivity(), user.getId()); PreferenceHelper.setUserName(getActivity(), user.getName()); ((TextView) getView().findViewById(R.id.userName)).setText(user.getName()); } } }).executeAsync(); } else { ((TextView) getView().findViewById(R.id.userName)).setText(userName); } new UserProfilePictureTask().execute(); } else { showProfile(false); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateView"
"private void updateView() { Session session = Session.getActiveSession(); if (session.isOpened()) { showProfile(true); String userName = PreferenceHelper.getUserName(getActivity()); if (TextUtils.isEmpty(userName)) { // make request to the /me API Request.newMeRequest(session, new Request.GraphUserCallback() { // callback after Graph API response with user object @Override public void onCompleted(GraphUser user, Response response) { if (user != null) { PreferenceHelper.setUserId(getActivity(), user.getId()); PreferenceHelper.setUserName(getActivity(), user.getName()); <MASK>new UserProfilePictureTask().execute();</MASK> ((TextView) getView().findViewById(R.id.userName)).setText(user.getName()); } } }).executeAsync(); } else { ((TextView) getView().findViewById(R.id.userName)).setText(userName); } } else { showProfile(false); } }"
Inversion-Mutation
megadiff
"public void updateFromUIDL(final UIDL uidl, final ApplicationConnection client) { this.client = client; this.id = uidl.getId(); if (isInitializingRequest(uidl)) { initialize(uidl); attachScrollHandlersIfNeeded(); findAllThingsToFetchAndFetchThem(distance); checkAndUpdatePlaceholderSizes(uidl); } if (isLazyLoadingRequest(uidl)) { if (uidl.hasAttribute(ATT_ADD_PLACEHOLDERS_INTARR)) { for (final int index : uidl .getIntArrayAttribute(ATT_REMOVE_COMPONENTS_INTARR)) { remove(index); } for (final int index : uidl .getIntArrayAttribute(ATT_ADD_PLACEHOLDERS_INTARR)) { insert(new PlaceholderWidget(placeholderWidth, placeholderHeight), index); } final ValueMap moves = uidl .getMapAttribute(ATT_MOVE_COMPONENTS_MAP); for (final String pid : moves.getKeySet()) { final Widget widget = (Widget) client.getPaintable(pid); final int newIndex = moves.getInt(pid); remove(widget); insert(widget, newIndex); } } addLazyLoadedWidgets(uidl, client); startSecondaryLoading(); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateFromUIDL"
"public void updateFromUIDL(final UIDL uidl, final ApplicationConnection client) { this.client = client; this.id = uidl.getId(); if (isInitializingRequest(uidl)) { initialize(uidl); attachScrollHandlersIfNeeded(); findAllThingsToFetchAndFetchThem(distance); } if (isLazyLoadingRequest(uidl)) { if (uidl.hasAttribute(ATT_ADD_PLACEHOLDERS_INTARR)) { for (final int index : uidl .getIntArrayAttribute(ATT_REMOVE_COMPONENTS_INTARR)) { remove(index); } for (final int index : uidl .getIntArrayAttribute(ATT_ADD_PLACEHOLDERS_INTARR)) { insert(new PlaceholderWidget(placeholderWidth, placeholderHeight), index); } final ValueMap moves = uidl .getMapAttribute(ATT_MOVE_COMPONENTS_MAP); for (final String pid : moves.getKeySet()) { final Widget widget = (Widget) client.getPaintable(pid); final int newIndex = moves.getInt(pid); remove(widget); insert(widget, newIndex); } } addLazyLoadedWidgets(uidl, client); <MASK>checkAndUpdatePlaceholderSizes(uidl);</MASK> startSecondaryLoading(); } }"
Inversion-Mutation
megadiff
"@SuppressWarnings("deprecation") protected void installActionInternal(KernelControllerContext context) throws Throwable { KernelController controller = (KernelController) context.getController(); Kernel kernel = controller.getKernel(); KernelConfigurator configurator = kernel.getConfigurator(); BeanMetaData metaData = context.getBeanMetaData(); BeanInfo info = context.getBeanInfo(); final Joinpoint joinPoint = configurator.getConstructorJoinPoint(info, metaData.getConstructor(), metaData); Object object = dispatchJoinPoint(context, joinPoint); if (object == null) throw new IllegalStateException("Instantiate joinpoint returned a null object: " + joinPoint); context.setTarget(object); try { if (info == null) { info = configurator.getBeanInfo(object.getClass(), metaData.getAccessMode()); context.setBeanInfo(info); // update class scope with class info KernelMetaDataRepository repository = kernel.getMetaDataRepository(); // remove old context repository.removeMetaData(context); // create new scope key ScopeInfo scopeInfo = context.getScopeInfo(); ScopeKey scopeKey = new ScopeKey(scopeInfo.getScope().getScopes()); scopeKey.addScope(CommonLevels.CLASS, info.getClassInfo().getType()); scopeInfo.setScope(scopeKey); // re-register repository.addMetaData(context); // handle custom annotations applyAnnotations(context); } DependencyInfo dependencyInfo = context.getDependencyInfo(); if (dependencyInfo != null && dependencyInfo.isAutowireCandidate()) controller.addInstantiatedContext(context); } catch (Throwable t) { uninstall(context); throw t; } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "installActionInternal"
"@SuppressWarnings("deprecation") protected void installActionInternal(KernelControllerContext context) throws Throwable { KernelController controller = (KernelController) context.getController(); Kernel kernel = controller.getKernel(); KernelConfigurator configurator = kernel.getConfigurator(); BeanMetaData metaData = context.getBeanMetaData(); BeanInfo info = context.getBeanInfo(); final Joinpoint joinPoint = configurator.getConstructorJoinPoint(info, metaData.getConstructor(), metaData); Object object = dispatchJoinPoint(context, joinPoint); if (object == null) throw new IllegalStateException("Instantiate joinpoint returned a null object: " + joinPoint); context.setTarget(object); try { if (info == null) { info = configurator.getBeanInfo(object.getClass(), metaData.getAccessMode()); context.setBeanInfo(info); // update class scope with class info <MASK>ScopeInfo scopeInfo = context.getScopeInfo();</MASK> KernelMetaDataRepository repository = kernel.getMetaDataRepository(); // remove old context repository.removeMetaData(context); // create new scope key ScopeKey scopeKey = new ScopeKey(scopeInfo.getScope().getScopes()); scopeKey.addScope(CommonLevels.CLASS, info.getClassInfo().getType()); scopeInfo.setScope(scopeKey); // re-register repository.addMetaData(context); // handle custom annotations applyAnnotations(context); } DependencyInfo dependencyInfo = context.getDependencyInfo(); if (dependencyInfo != null && dependencyInfo.isAutowireCandidate()) controller.addInstantiatedContext(context); } catch (Throwable t) { uninstall(context); throw t; } }"
Inversion-Mutation
megadiff
"public static Object executeScript(final NodeModel node, final Object script, Script compiledScript, final IErrorHandler pErrorHandler, final PrintStream pOutStream, final ScriptContext scriptContext, ScriptingPermissions permissions) { try { final FreeplaneSecurityManager securityManager = (FreeplaneSecurityManager) System.getSecurityManager(); final boolean needsSecurityManager = securityManager.needsFinalSecurityManager(); final ScriptingSecurityManager scriptingSecurityManager = scriptingSecurityManager(script, pOutStream, permissions); ScriptingPermissions originalScriptingPermissions = new ScriptingPermissions(ResourceController.getResourceController().getProperties()); final PrintStream oldOut = System.out; try { final Binding binding = new Binding(); binding.setVariable("c", ProxyFactory.createController(scriptContext)); binding.setVariable("node", ProxyFactory.createNode(node, scriptContext)); binding.setVariable("cookies", ScriptingEngine.sScriptCookies); compiledScript.setBinding(binding); if (needsSecurityManager) securityManager.setFinalSecurityManager(scriptingSecurityManager); System.setOut(pOutStream); return compiledScript.run(); } finally { if (compiledScript != null) { InvokerHelper.removeClass(script.getClass()); if (needsSecurityManager) securityManager.removeFinalSecurityManager(scriptingSecurityManager); } System.setOut(oldOut); /* restore preferences (and assure that the values are unchanged!). */ originalScriptingPermissions.restorePermissions(); } } catch (final GroovyRuntimeException e) { handleGroovyRuntimeException(e, pOutStream, pErrorHandler); throw new RuntimeException(e); } catch (final Throwable e) { if (Controller.getCurrentController().getSelection() != null) Controller.getCurrentModeController().getMapController().select(node); throw new ExecuteScriptException(e.getMessage(), e); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "executeScript"
"public static Object executeScript(final NodeModel node, final Object script, Script compiledScript, final IErrorHandler pErrorHandler, final PrintStream pOutStream, final ScriptContext scriptContext, ScriptingPermissions permissions) { try { <MASK>ScriptingPermissions originalScriptingPermissions = new ScriptingPermissions(ResourceController.getResourceController().getProperties());</MASK> final FreeplaneSecurityManager securityManager = (FreeplaneSecurityManager) System.getSecurityManager(); final boolean needsSecurityManager = securityManager.needsFinalSecurityManager(); final ScriptingSecurityManager scriptingSecurityManager = scriptingSecurityManager(script, pOutStream, permissions); final PrintStream oldOut = System.out; try { final Binding binding = new Binding(); binding.setVariable("c", ProxyFactory.createController(scriptContext)); binding.setVariable("node", ProxyFactory.createNode(node, scriptContext)); binding.setVariable("cookies", ScriptingEngine.sScriptCookies); compiledScript.setBinding(binding); if (needsSecurityManager) securityManager.setFinalSecurityManager(scriptingSecurityManager); System.setOut(pOutStream); return compiledScript.run(); } finally { if (compiledScript != null) { InvokerHelper.removeClass(script.getClass()); if (needsSecurityManager) securityManager.removeFinalSecurityManager(scriptingSecurityManager); } System.setOut(oldOut); /* restore preferences (and assure that the values are unchanged!). */ originalScriptingPermissions.restorePermissions(); } } catch (final GroovyRuntimeException e) { handleGroovyRuntimeException(e, pOutStream, pErrorHandler); throw new RuntimeException(e); } catch (final Throwable e) { if (Controller.getCurrentController().getSelection() != null) Controller.getCurrentModeController().getMapController().select(node); throw new ExecuteScriptException(e.getMessage(), e); } }"
Inversion-Mutation
megadiff
"@Override public void remove() { map.onRemove(this); real.remove(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "remove"
"@Override public void remove() { <MASK>real.remove();</MASK> map.onRemove(this); }"
Inversion-Mutation
megadiff
"protected boolean computeScrollHelper() { if (mScroller.computeScrollOffset()) { // Don't bother scrolling if the page does not need to be moved if (getScrollX() != mScroller.getCurrX() || getScrollY() != mScroller.getCurrY() || mOverScrollX != mScroller.getCurrX()) { scrollTo(mScroller.getCurrX(), mScroller.getCurrY()); } invalidate(); return true; } else if (mNextPage != INVALID_PAGE) { mCurrentPage = Math.max(0, Math.min(mNextPage, getPageCount() - 1)); mNextPage = INVALID_PAGE; notifyPageSwitchListener(); // Load the associated pages if necessary if (mDeferLoadAssociatedPagesUntilScrollCompletes) { loadAssociatedPages(mCurrentPage); mDeferLoadAssociatedPagesUntilScrollCompletes = false; } // We don't want to trigger a page end moving unless the page has settled // and the user has stopped scrolling if (mTouchState == TOUCH_STATE_REST) { pageEndMoving(); } // Notify the user when the page changes AccessibilityManager accessibilityManager = (AccessibilityManager) getContext().getSystemService(Context.ACCESSIBILITY_SERVICE); if (accessibilityManager.isEnabled()) { AccessibilityEvent ev = AccessibilityEvent.obtain(AccessibilityEvent.TYPE_VIEW_SCROLLED); ev.getText().add(getCurrentPageDescription()); sendAccessibilityEventUnchecked(ev); } return true; } return false; }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "computeScrollHelper"
"protected boolean computeScrollHelper() { if (mScroller.computeScrollOffset()) { // Don't bother scrolling if the page does not need to be moved if (getScrollX() != mScroller.getCurrX() || getScrollY() != mScroller.getCurrY() || mOverScrollX != mScroller.getCurrX()) { scrollTo(mScroller.getCurrX(), mScroller.getCurrY()); <MASK>invalidate();</MASK> } return true; } else if (mNextPage != INVALID_PAGE) { mCurrentPage = Math.max(0, Math.min(mNextPage, getPageCount() - 1)); mNextPage = INVALID_PAGE; notifyPageSwitchListener(); // Load the associated pages if necessary if (mDeferLoadAssociatedPagesUntilScrollCompletes) { loadAssociatedPages(mCurrentPage); mDeferLoadAssociatedPagesUntilScrollCompletes = false; } // We don't want to trigger a page end moving unless the page has settled // and the user has stopped scrolling if (mTouchState == TOUCH_STATE_REST) { pageEndMoving(); } // Notify the user when the page changes AccessibilityManager accessibilityManager = (AccessibilityManager) getContext().getSystemService(Context.ACCESSIBILITY_SERVICE); if (accessibilityManager.isEnabled()) { AccessibilityEvent ev = AccessibilityEvent.obtain(AccessibilityEvent.TYPE_VIEW_SCROLLED); ev.getText().add(getCurrentPageDescription()); sendAccessibilityEventUnchecked(ev); } return true; } return false; }"
Inversion-Mutation
megadiff
"public void drawNumber(int n, float x, float y, float scale){ if (n<0) n=0; if (n<100) { int c1=n/10, c2=n%10; Digit[c1].draw(x,y,scale); Digit[c2].draw(x+12*scale,y,scale);} else { int c1=n/100; int c2=(n-100)/10; int c3=(n-100)%10; Digit[c1].draw(x,y,scale); Digit[c2].draw(x+12*scale,y,scale); Digit[c3].draw(x+24*scale,y,scale);} }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "drawNumber"
"public void drawNumber(int n, float x, float y, float scale){ if (n<100) { int c1=n/10, c2=n%10; Digit[c1].draw(x,y,scale); Digit[c2].draw(x+12*scale,y,scale);} else { <MASK>if (n<0) n=0;</MASK> int c1=n/100; int c2=(n-100)/10; int c3=(n-100)%10; Digit[c1].draw(x,y,scale); Digit[c2].draw(x+12*scale,y,scale); Digit[c3].draw(x+24*scale,y,scale);} }"
Inversion-Mutation
megadiff
"public void feedEPackagesFromRegistry() { List<String> processedNsURIs = new ArrayList<String>(); for (boolean hasChanged = true; hasChanged;) { List<String> nsURIs = new ArrayList<String>(EPackage.Registry.INSTANCE.keySet()); hasChanged = false; for (String nsURI : nsURIs) { try { if (!processedNsURIs.contains(nsURI)) { hasChanged = true; processedNsURIs.add(nsURI); EPackage ePackage = EPackage.Registry.INSTANCE.getEPackage(nsURI); index(ePackage, true); } } catch (Exception exc) { LogFacade.logError("Error indexin EPackages from registry", exc); } } } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "feedEPackagesFromRegistry"
"public void feedEPackagesFromRegistry() { List<String> processedNsURIs = new ArrayList<String>(); for (boolean hasChanged = true; hasChanged;) { List<String> nsURIs = new ArrayList<String>(EPackage.Registry.INSTANCE.keySet()); for (String nsURI : nsURIs) { <MASK>hasChanged = false;</MASK> try { if (!processedNsURIs.contains(nsURI)) { hasChanged = true; processedNsURIs.add(nsURI); EPackage ePackage = EPackage.Registry.INSTANCE.getEPackage(nsURI); index(ePackage, true); } } catch (Exception exc) { LogFacade.logError("Error indexin EPackages from registry", exc); } } } }"
Inversion-Mutation
megadiff
"protected void setupEnvironment(PythonInterpreter interp, Properties props, PySystemState systemState) throws PyException { processPythonLib(interp, systemState); checkSitePackages(props); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setupEnvironment"
"protected void setupEnvironment(PythonInterpreter interp, Properties props, PySystemState systemState) throws PyException { <MASK>checkSitePackages(props);</MASK> processPythonLib(interp, systemState); }"
Inversion-Mutation
megadiff
"public UnilateralSortMerger(MemoryManager memoryManager, IOManager ioManager, long totalMemory, long maxWriteMem, int numSortBuffers, int maxNumFileHandles, Comparator<Key>[] keyComparators, int[] keyPositions, Class<? extends Key>[] keyClasses, MutableObjectIterator<PactRecord> input, AbstractInvokable parentTask, float startSpillingFraction) throws IOException, MemoryAllocationException { // sanity checks if (memoryManager == null | ioManager == null | keyComparators == null | keyPositions == null | keyClasses == null) { throw new NullPointerException(); } if (parentTask == null) { throw new NullPointerException("Parent Task must not be null."); } if (maxNumFileHandles < 2) { throw new IllegalArgumentException("Merger cannot work with less than two file handles."); } if (keyComparators.length < 1) { throw new IllegalArgumentException("There must be at least one sort column and hence one comparator."); } if (keyComparators.length != keyPositions.length || keyPositions.length != keyClasses.length) { throw new IllegalArgumentException("The number of comparators, key columns and key types must match."); } if (totalMemory < MIN_SORT_MEM + MIN_WRITE_MEM) { throw new IllegalArgumentException("Too little memory provided to Sort-Merger to perform task."); } this.maxNumFileHandles = maxNumFileHandles; this.memoryManager = memoryManager; this.ioManager = ioManager; this.keyComparators = keyComparators; this.keyPositions = keyPositions; this.keyClasses = keyClasses; this.parent = parentTask; this.memoryToReleaseAtShutdown = new ArrayList<List<MemorySegment>>(); this.channelsToDeleteAtShutdown = new ArrayList<Channel.ID>(); this.openChannels = new ArrayList<BlockChannelAccess<?,?>>(); // determine the size of the I/O buffers. the size must be chosen such that we can accommodate // the desired number of merges, plus the writing, from the total memory if (maxWriteMem != 0) { if (maxWriteMem != -1 && maxWriteMem < MIN_WRITE_MEM) { throw new IllegalArgumentException("The specified maximum write memory is to low. " + "Required are at least " + MIN_WRITE_MEM + " bytes."); } // determine how the reading side limits the buffer size, because we buffers for the readers // during the merging phase final int minBuffers = NUM_WRITE_BUFFERS + maxNumFileHandles; final int desiredBuffers = NUM_WRITE_BUFFERS + 2 * maxNumFileHandles; int bufferSize = (int) (totalMemory / desiredBuffers); if (bufferSize < MIN_IO_BUFFER_SIZE) { bufferSize = MIN_IO_BUFFER_SIZE; if (totalMemory / minBuffers < MIN_IO_BUFFER_SIZE) { maxNumFileHandles = (int) (totalMemory / MIN_IO_BUFFER_SIZE) - NUM_WRITE_BUFFERS; if (LOG.isWarnEnabled()) LOG.warn("Reducing maximal merge fan-in to " + maxNumFileHandles + " due to memory limitations."); } } else { bufferSize = Math.min(MAX_IO_BUFFER_SIZE, MathUtils.roundDownToPowerOf2(bufferSize)); } if (maxWriteMem < 0) { maxWriteMem = Math.max(totalMemory / 64, MIN_WRITE_MEM); } this.ioBufferSize = Math.min(bufferSize, MathUtils.roundDownToPowerOf2((int) (maxWriteMem / NUM_WRITE_BUFFERS))); maxWriteMem = NUM_WRITE_BUFFERS * this.ioBufferSize; } else { // no I/O happening this.ioBufferSize = -1; } final long sortMem = totalMemory - maxWriteMem; final long numSortMemSegments = sortMem / SORT_MEM_SEGMENT_SIZE; // decide how many sort buffers to use if (numSortBuffers < 1) { if (sortMem > 96 * 1024 * 1024) { numSortBuffers = 3; } else if (numSortMemSegments >= 2 * MIN_NUM_SORT_MEM_SEGMENTS) { numSortBuffers = 2; } else { numSortBuffers = 1; } } final int numSegmentsPerSortBuffer = numSortMemSegments / numSortBuffers > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) (numSortMemSegments / numSortBuffers); if (LOG.isDebugEnabled()) { LOG.debug("Instantiating unilateral sort-merger with " + maxWriteMem + " bytes of write cache and " + sortMem + " bytes of sorting/merging memory. Dividing sort memory over " + numSortBuffers + " buffers (" + numSegmentsPerSortBuffer + " pages with " + SORT_MEM_SEGMENT_SIZE + " bytes) , merging maximally " + maxNumFileHandles + " streams at once."); } // circular queues pass buffers between the threads final CircularQueues circularQueues = new CircularQueues(); this.sortBuffers = new ArrayList<NormalizedKeySorter<?>>(numSortBuffers); // allocate the sort buffers and fill empty queue with them for (int i = 0; i < numSortBuffers; i++) { final List<MemorySegment> sortSegments = memoryManager.allocateStrict(parentTask, numSegmentsPerSortBuffer, SORT_MEM_SEGMENT_SIZE); final PactRecordAccessors accessors = new PactRecordAccessors(keyPositions, keyClasses); final NormalizedKeySorter<PactRecord> buffer = new NormalizedKeySorter<PactRecord>(accessors, sortSegments); this.sortBuffers.add(buffer); // add to empty queue CircularElement element = new CircularElement(i, buffer); circularQueues.empty.add(element); } // exception handling ExceptionHandler<IOException> exceptionHandler = new ExceptionHandler<IOException>() { public void handleException(IOException exception) { // forward exception if (!closed) { setResultIteratorException(exception); close(); } } }; // start the thread that reads the input channels this.readThread = getReadingThread(exceptionHandler, input, circularQueues, parentTask, ((long) (startSpillingFraction * sortMem))); // start the thread that sorts the buffers this.sortThread = getSortingThread(exceptionHandler, circularQueues, parentTask); // start the thread that handles spilling to secondary storage this.spillThread = getSpillingThread(exceptionHandler, circularQueues, memoryManager, ioManager, sortMem, parentTask); startThreads(); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "UnilateralSortMerger"
"public UnilateralSortMerger(MemoryManager memoryManager, IOManager ioManager, long totalMemory, long maxWriteMem, int numSortBuffers, int maxNumFileHandles, Comparator<Key>[] keyComparators, int[] keyPositions, Class<? extends Key>[] keyClasses, MutableObjectIterator<PactRecord> input, AbstractInvokable parentTask, float startSpillingFraction) throws IOException, MemoryAllocationException { // sanity checks if (memoryManager == null | ioManager == null | keyComparators == null | keyPositions == null | keyClasses == null) { throw new NullPointerException(); } if (parentTask == null) { throw new NullPointerException("Parent Task must not be null."); } if (maxNumFileHandles < 2) { throw new IllegalArgumentException("Merger cannot work with less than two file handles."); } if (keyComparators.length < 1) { throw new IllegalArgumentException("There must be at least one sort column and hence one comparator."); } if (keyComparators.length != keyPositions.length || keyPositions.length != keyClasses.length) { throw new IllegalArgumentException("The number of comparators, key columns and key types must match."); } if (totalMemory < MIN_SORT_MEM + MIN_WRITE_MEM) { throw new IllegalArgumentException("Too little memory provided to Sort-Merger to perform task."); } this.maxNumFileHandles = maxNumFileHandles; this.memoryManager = memoryManager; this.ioManager = ioManager; this.keyComparators = keyComparators; this.keyPositions = keyPositions; this.keyClasses = keyClasses; this.parent = parentTask; this.memoryToReleaseAtShutdown = new ArrayList<List<MemorySegment>>(); this.channelsToDeleteAtShutdown = new ArrayList<Channel.ID>(); this.openChannels = new ArrayList<BlockChannelAccess<?,?>>(); // determine the size of the I/O buffers. the size must be chosen such that we can accommodate // the desired number of merges, plus the writing, from the total memory if (maxWriteMem != 0) { if (maxWriteMem != -1 && maxWriteMem < MIN_WRITE_MEM) { throw new IllegalArgumentException("The specified maximum write memory is to low. " + "Required are at least " + MIN_WRITE_MEM + " bytes."); } // determine how the reading side limits the buffer size, because we buffers for the readers // during the merging phase final int minBuffers = NUM_WRITE_BUFFERS + maxNumFileHandles; final int desiredBuffers = NUM_WRITE_BUFFERS + 2 * maxNumFileHandles; int bufferSize = (int) (totalMemory / desiredBuffers); if (bufferSize < MIN_IO_BUFFER_SIZE) { bufferSize = MIN_IO_BUFFER_SIZE; if (totalMemory / minBuffers < MIN_IO_BUFFER_SIZE) { maxNumFileHandles = (int) (totalMemory / MIN_IO_BUFFER_SIZE) - NUM_WRITE_BUFFERS; if (LOG.isWarnEnabled()) LOG.warn("Reducing maximal merge fan-in to " + maxNumFileHandles + " due to memory limitations."); } } else { bufferSize = Math.min(MAX_IO_BUFFER_SIZE, MathUtils.roundDownToPowerOf2(bufferSize)); } if (maxWriteMem < 0) { maxWriteMem = Math.max(totalMemory / 64, MIN_WRITE_MEM); } this.ioBufferSize = Math.min(bufferSize, MathUtils.roundDownToPowerOf2((int) (maxWriteMem / NUM_WRITE_BUFFERS))); maxWriteMem = NUM_WRITE_BUFFERS * this.ioBufferSize; } else { // no I/O happening this.ioBufferSize = -1; } final long sortMem = totalMemory - maxWriteMem; final long numSortMemSegments = sortMem / SORT_MEM_SEGMENT_SIZE; // decide how many sort buffers to use if (numSortBuffers < 1) { if (sortMem > 96 * 1024 * 1024) { numSortBuffers = 3; } else if (numSortMemSegments >= 2 * MIN_NUM_SORT_MEM_SEGMENTS) { numSortBuffers = 2; } else { numSortBuffers = 1; } } final int numSegmentsPerSortBuffer = numSortMemSegments / numSortBuffers > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) (numSortMemSegments / numSortBuffers); if (LOG.isDebugEnabled()) { LOG.debug("Instantiating unilateral sort-merger with " + maxWriteMem + " bytes of write cache and " + sortMem + " bytes of sorting/merging memory. Dividing sort memory over " + numSortBuffers + " buffers (" + numSegmentsPerSortBuffer + " pages with " + SORT_MEM_SEGMENT_SIZE + " bytes) , merging maximally " + maxNumFileHandles + " streams at once."); } // circular queues pass buffers between the threads final CircularQueues circularQueues = new CircularQueues(); this.sortBuffers = new ArrayList<NormalizedKeySorter<?>>(numSortBuffers); <MASK>final PactRecordAccessors accessors = new PactRecordAccessors(keyPositions, keyClasses);</MASK> // allocate the sort buffers and fill empty queue with them for (int i = 0; i < numSortBuffers; i++) { final List<MemorySegment> sortSegments = memoryManager.allocateStrict(parentTask, numSegmentsPerSortBuffer, SORT_MEM_SEGMENT_SIZE); final NormalizedKeySorter<PactRecord> buffer = new NormalizedKeySorter<PactRecord>(accessors, sortSegments); this.sortBuffers.add(buffer); // add to empty queue CircularElement element = new CircularElement(i, buffer); circularQueues.empty.add(element); } // exception handling ExceptionHandler<IOException> exceptionHandler = new ExceptionHandler<IOException>() { public void handleException(IOException exception) { // forward exception if (!closed) { setResultIteratorException(exception); close(); } } }; // start the thread that reads the input channels this.readThread = getReadingThread(exceptionHandler, input, circularQueues, parentTask, ((long) (startSpillingFraction * sortMem))); // start the thread that sorts the buffers this.sortThread = getSortingThread(exceptionHandler, circularQueues, parentTask); // start the thread that handles spilling to secondary storage this.spillThread = getSpillingThread(exceptionHandler, circularQueues, memoryManager, ioManager, sortMem, parentTask); startThreads(); }"
Inversion-Mutation
megadiff
"private void startAll() { //image ingesters while (hasNextImage()) { //dequeue final QueueUnit<Image, IngestServiceImage> qu = this.getNextImage(); //check if such (service,image) already running synchronized (this) { for (IngestServiceImage quService : qu.services) { boolean alreadyRunning = false; for (IngestImageThread worker : imageIngesters) { if (!worker.getImage().equals(qu.content)) { continue; //check next worker } //same image, check service (by name, not id, since different instances) if (worker.getService().getName().equals(quService.getName())) { alreadyRunning = true; logger.log(Level.INFO, "Image Ingester <" + qu.content + ", " + quService.getName() + "> is already running"); break; } } //checked all workers if (alreadyRunning == false) { logger.log(Level.INFO, "Starting new image Ingester <" + qu.content + ", " + quService.getName() + ">"); IngestImageThread newImageWorker = new IngestImageThread(this, qu.content, quService); imageIngesters.add(newImageWorker); //image services are now initialized per instance quService.init(this); newImageWorker.execute(); IngestManager.firePropertyChange(SERVICE_STARTED_EVT, quService.getName()); } } } } //fsContent ingester boolean startFsContentIngester = false; if (hasNextFsContent()) { if (fsContentIngester == null) { startFsContentIngester = true; logger.log(Level.INFO, "Starting initial FsContent ingester"); } //if worker had completed, restart it in case data is still enqueued else if (fsContentIngester.isDone()) { startFsContentIngester = true; logger.log(Level.INFO, "Restarting fsContent ingester"); } } else { logger.log(Level.INFO, "no new FsContent enqueued, no ingester needed"); } if (startFsContentIngester) { stats = new IngestManagerStats(); fsContentIngester = new IngestFsContentThread(); //init all fs services, everytime new worker starts for (IngestServiceFsContent s : fsContentServices) { s.init(this); } fsContentIngester.execute(); } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "startAll"
"private void startAll() { //image ingesters while (hasNextImage()) { //dequeue final QueueUnit<Image, IngestServiceImage> qu = this.getNextImage(); //check if such (service,image) already running synchronized (this) { for (IngestServiceImage quService : qu.services) { boolean alreadyRunning = false; for (IngestImageThread worker : imageIngesters) { if (!worker.getImage().equals(qu.content)) { continue; //check next worker } //same image, check service (by name, not id, since different instances) if (worker.getService().getName().equals(quService.getName())) { alreadyRunning = true; logger.log(Level.INFO, "Image Ingester <" + qu.content + ", " + quService.getName() + "> is already running"); break; } } //checked all workers if (alreadyRunning == false) { logger.log(Level.INFO, "Starting new image Ingester <" + qu.content + ", " + quService.getName() + ">"); IngestImageThread newImageWorker = new IngestImageThread(this, qu.content, quService); imageIngesters.add(newImageWorker); //image services are now initialized per instance quService.init(this); newImageWorker.execute(); IngestManager.firePropertyChange(SERVICE_STARTED_EVT, quService.getName()); } } } } //fsContent ingester boolean startFsContentIngester = false; if (hasNextFsContent()) { if (fsContentIngester == null) { startFsContentIngester = true; logger.log(Level.INFO, "Starting initial FsContent ingester"); } //if worker had completed, restart it in case data is still enqueued else if (fsContentIngester.isDone()) { startFsContentIngester = true; logger.log(Level.INFO, "Restarting fsContent ingester"); } } else { logger.log(Level.INFO, "no new FsContent enqueued, no ingester needed"); } if (startFsContentIngester) { fsContentIngester = new IngestFsContentThread(); //init all fs services, everytime new worker starts for (IngestServiceFsContent s : fsContentServices) { s.init(this); } <MASK>stats = new IngestManagerStats();</MASK> fsContentIngester.execute(); } }"
Inversion-Mutation
megadiff
"@Override public void create () { //com.badlogic.gdx.graphics.g3d.model.still.StillModel model = // ModelLoaderRegistry.loadStillModel(Gdx.files.internal("data/models/base.g3dt")); //com.badlogic.gdx.graphics.g3d.loaders.g3d.chunks.G3dExporter.export(model, Gdx.files.absolute("data/models/base.g3d")); options = new OptionsUtil(); creatureManager = new CreatureManager(); worldLocationManager = new WorldLocationUtil(); textureMap = new HashMap<String, Texture>(); textureMap.put("skydome", new Texture(Gdx.files.internal("data/sky/skydome.png"), Format.RGB565, true)); textureMap.put("base", new Texture(Gdx.files.internal("data/textures/base.png"), Format.RGB565, true)); textureMap.put("grass", new Texture(Gdx.files.internal("data/textures/grass1.jpg"), Format.RGB565, true)); textureMap.get("grass").setFilter(TextureFilter.MipMap, TextureFilter.Nearest); modelMap = new HashMap<String, Model>(); modelMap.put("skydome", ModelLoaderRegistry.load(Gdx.files.internal("data/sky/skydome.obj"))); modelMap.put("base", ModelLoaderRegistry.load(Gdx.files.internal("data/models/base.g3d"))); for(String name : creatureManager.getCreatureTemplateNames()){ modelMap.put(name, ModelLoaderRegistry.load(Gdx.files.internal("data/models/" + name.toLowerCase() + ".g3d"))); try{ textureMap.put(name, new Texture(Gdx.files.internal("data/textures/" + name.toLowerCase() + ".png"), Format.RGB565, true)); }catch(Exception e){} } Gdx.input.removeComplexGestureListener(null); setScreen(new MainScreen(this)); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "create"
"@Override public void create () { //com.badlogic.gdx.graphics.g3d.model.still.StillModel model = // ModelLoaderRegistry.loadStillModel(Gdx.files.internal("data/models/base.g3dt")); //com.badlogic.gdx.graphics.g3d.loaders.g3d.chunks.G3dExporter.export(model, Gdx.files.absolute("data/models/base.g3d")); <MASK>Gdx.input.removeComplexGestureListener(null);</MASK> options = new OptionsUtil(); creatureManager = new CreatureManager(); worldLocationManager = new WorldLocationUtil(); textureMap = new HashMap<String, Texture>(); textureMap.put("skydome", new Texture(Gdx.files.internal("data/sky/skydome.png"), Format.RGB565, true)); textureMap.put("base", new Texture(Gdx.files.internal("data/textures/base.png"), Format.RGB565, true)); textureMap.put("grass", new Texture(Gdx.files.internal("data/textures/grass1.jpg"), Format.RGB565, true)); textureMap.get("grass").setFilter(TextureFilter.MipMap, TextureFilter.Nearest); modelMap = new HashMap<String, Model>(); modelMap.put("skydome", ModelLoaderRegistry.load(Gdx.files.internal("data/sky/skydome.obj"))); modelMap.put("base", ModelLoaderRegistry.load(Gdx.files.internal("data/models/base.g3d"))); for(String name : creatureManager.getCreatureTemplateNames()){ modelMap.put(name, ModelLoaderRegistry.load(Gdx.files.internal("data/models/" + name.toLowerCase() + ".g3d"))); try{ textureMap.put(name, new Texture(Gdx.files.internal("data/textures/" + name.toLowerCase() + ".png"), Format.RGB565, true)); }catch(Exception e){} } setScreen(new MainScreen(this)); }"
Inversion-Mutation
megadiff
"private void handleActivation() { if (fIsHandlingActivation) return; if (fActivePart == AbstractTextEditor.this) { fIsHandlingActivation= true; fHasBeenActivated= true; try { safelySanityCheckState(getEditorInput()); } finally { fIsHandlingActivation= false; } } }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleActivation"
"private void handleActivation() { if (fIsHandlingActivation) return; if (fActivePart == AbstractTextEditor.this) { fIsHandlingActivation= true; try { safelySanityCheckState(getEditorInput()); } finally { fIsHandlingActivation= false; } } <MASK>fHasBeenActivated= true;</MASK> }"
Inversion-Mutation
megadiff
"@Override public void enableMaster(String networkName, State lastKnownState, int masterId) { String myLocation = configuration.get("localIp") + ":" + configuration.get("pport"); String masterUrl = configuration.get("baseUrl") + "MasterService.json"; master = Master.create(connections, masterUrl, configuration.get("networkName"), myLocation, masterRpcf); pServer.registerService(master.getNewService()); master.resumeFrom(lastKnownState, masterId); master.start(); registerNetwork(master); }"
You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "enableMaster"
"@Override public void enableMaster(String networkName, State lastKnownState, int masterId) { String myLocation = configuration.get("localIp") + ":" + configuration.get("pport"); String masterUrl = configuration.get("baseUrl") + "MasterService.json"; master = Master.create(connections, masterUrl, configuration.get("networkName"), myLocation, masterRpcf); <MASK>master.resumeFrom(lastKnownState, masterId);</MASK> pServer.registerService(master.getNewService()); master.start(); registerNetwork(master); }"