Projects >> ImageJA >>b89abd1529bd42b0f7d02d92f9af349f2b13f836

Chunk
Conflicting content
				runCommand(cmd);
				Recorder.saveCommand();
			} else
<<<<<<< HEAD
				runCommand(cmd);
=======
				runCommand(command);
			if (command.charAt(command.length()-1)!=']') // set keys up except for "<" and ">" shortcuts
				IJ.setKeyUp(IJ.ALL_KEYS);	
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		} catch(Throwable e) {
			IJ.showStatus("");
			IJ.showProgress(1.0);
Solution content
				runCommand(cmd);
				Recorder.saveCommand();
			} else
				runCommand(cmd);
			if (command.charAt(command.length()-1)!=']') // set keys up except for "<" and ">" shortcuts
				IJ.setKeyUp(IJ.ALL_KEYS);	
		} catch(Throwable e) {
			IJ.showStatus("");
			IJ.showProgress(1.0);
File
Executer.java
Developer's decision
Combination
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
					cmd.className = cmd.className.substring(0, argStart);
				}
			}
<<<<<<< HEAD
			notifyCommandListeners(cmd, CommandListenerPlus.CMD_READY);
			if (cmd.isConsumed()) return; // last chance to interrupt
			if (IJ.shiftKeyDown() && cmd.className.startsWith("ij.plugin.Macro_Runner") && !Menus.getShortcuts().contains("*"+cmd)) {
    			IJ.open(IJ.getDirectory("plugins")+cmd.arg);
				IJ.setKeyUp(KeyEvent.VK_SHIFT);		
    			} else {
				cmd.plugin = IJ.runPlugIn(cmd.command, cmd.className, cmd.arg);
			}
			notifyCommandListeners(cmd, CommandListenerPlus.CMD_STARTED);
=======
			if (IJ.shiftKeyDown() && className.startsWith("ij.plugin.Macro_Runner") && !Menus.getShortcuts().contains("*"+cmd))
    			IJ.open(IJ.getDirectory("plugins")+arg);
    		else
				IJ.runPlugIn(cmd, className, arg);
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		} else {
			notifyCommandListeners(cmd, CommandListenerPlus.CMD_READY);
			// Is this command in Plugins>Macros?
Solution content
					cmd.className = cmd.className.substring(0, argStart);
				}
			}
			notifyCommandListeners(cmd, CommandListenerPlus.CMD_READY);
			if (cmd.isConsumed()) return; // last chance to interrupt
			if (IJ.shiftKeyDown() && cmd.className.startsWith("ij.plugin.Macro_Runner") && !Menus.getShortcuts().contains("*"+cmd))
    			IJ.open(IJ.getDirectory("plugins")+cmd.arg);
    			else {
				cmd.plugin = IJ.runPlugIn(cmd.command, cmd.className, cmd.arg);
			}
			notifyCommandListeners(cmd, CommandListenerPlus.CMD_STARTED);
		} else {
			notifyCommandListeners(cmd, CommandListenerPlus.CMD_READY);
			// Is this command in Plugins>Macros?
File
Executer.java
Developer's decision
Manual
Kind of conflict
Comment
If statement
Method invocation
Chunk
Conflicting content
/** This class consists of static utility methods. */
public class IJ {
	public static final String URL = "http://rsb.info.nih.gov/ij";
<<<<<<< HEAD
	public static final int ALL_KEYS = 0x32;
=======
	public static final int ALL_KEYS = -1;
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
	
	public static boolean debugMode;
	public static boolean hideProcessStackDialog;
Solution content
/** This class consists of static utility methods. */
public class IJ {
	public static final String URL = "http://rsb.info.nih.gov/ij";
	public static final int ALL_KEYS = -1;
	
	public static boolean debugMode;
	public static boolean hideProcessStackDialog;
File
IJ.java
Developer's decision
Version 2
Kind of conflict
Attribute
Chunk
Conflicting content
			IJ.runPlugIn("ij.plugin.DragAndDrop", "");
		m.installStartupMacroSet();
		String str = m.getMacroCount()==1?" macro)":" macros)";
<<<<<<< HEAD
		String java = "Java "+System.getProperty("java.version");
=======
		String java = "Java "+System.getProperty("java.version")+(IJ.is64Bit()?" [64-bit]":" [32-bit]");
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		IJ.showStatus("ImageJ "+VERSION + "/"+java+" ("+ m.getPluginCount() + " commands, " + m.getMacroCount() + str);
		if (applet==null && !embedded)
			new SocketListener();
Solution content
			IJ.runPlugIn("ij.plugin.DragAndDrop", "");
		m.installStartupMacroSet();
		String str = m.getMacroCount()==1?" macro)":" macros)";
		String java = "Java "+System.getProperty("java.version")+(IJ.is64Bit()?" [64-bit]":" [32-bit]");
		IJ.showStatus("ImageJ "+VERSION + "/"+java+" ("+ m.getPluginCount() + " commands, " + m.getMacroCount() + str);
		if (applet==null && !embedded)
			new SocketListener();
File
ImageJ.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
	
	public static final int MAX_OPEN_RECENT_ITEMS = 15;

<<<<<<< HEAD
	private static Menus instance;
	private MenuBar mbar;
	private CheckboxMenuItem gray8Item,gray16Item,gray32Item,
=======
	private static MenuBar mbar;
	private static CheckboxMenuItem gray8Item,gray16Item,gray32Item,
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
			color256Item,colorRGBItem,RGBStackItem,HSBStackItem;
	private PopupMenu popup;
Solution content
	
	public static final int MAX_OPEN_RECENT_ITEMS = 15;

	private static Menus instance;
	private MenuBar mbar;
	private CheckboxMenuItem gray8Item,gray16Item,gray32Item,
			color256Item,colorRGBItem,RGBStackItem,HSBStackItem;
	private PopupMenu popup;
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
	private static ImageJ ij;
	private static ImageJApplet applet;
	private Hashtable demoImagesTable = new Hashtable();
<<<<<<< HEAD
	private String pluginsPath, macrosPath;
	private Properties menus = new Properties();
	private Properties menuSeparators;
	static Menu window, openRecentMenu, pluginsMenu, shortcutsMenu, utilitiesMenu, macrosMenu;
	private Hashtable pluginsTable;
	
	private int nPlugins, nMacros;
	private Hashtable shortcuts = new Hashtable();
	private Hashtable macroShortcuts;
	private Vector pluginsPrefs = new Vector(); // commands saved in IJ_Prefs
=======
	private static String pluginsPath, macrosPath;
	private static Properties menus;
	private static Properties menuSeparators;
	private static Menu pluginsMenu, saveAsMenu, shortcutsMenu, utilitiesMenu, macrosMenu;
	static Menu window, openRecentMenu;
	private static Hashtable pluginsTable;
	
	private static int nPlugins, nMacros;
	private static Hashtable shortcuts;
	private static Hashtable macroShortcuts;
	private static Vector pluginsPrefs; // commands saved in IJ_Prefs
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
	static int windowMenuItems2; // non-image windows listed in Window menu + separator
	private String error;
	private String jarError;
Solution content
	private static ImageJ ij;
	private static ImageJApplet applet;
	private Hashtable demoImagesTable = new Hashtable();
	private String pluginsPath, macrosPath;
	private Properties menus = new Properties();
	private Properties menuSeparators;
	static Menu window, openRecentMenu, pluginsMenu, shortcutsMenu, utilitiesMenu, macrosMenu;
	private Hashtable pluginsTable;
	
	private int nPlugins, nMacros;
	private Hashtable shortcuts = new Hashtable();
	private Hashtable macroShortcuts;
	private Vector pluginsPrefs = new Vector(); // commands saved in IJ_Prefs
	static int windowMenuItems2; // non-image windows listed in Window menu + separator
	private String error;
	private String jarError;
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
Method invocation
Chunk
Conflicting content
	private String jarError;
	private String pluginError;
    private boolean isJarErrorHeading;
<<<<<<< HEAD
	private boolean installingJars, duplicateCommand;
	private Vector jarFiles;  // JAR files in plugins folder with "_" in their name
	private Vector macroFiles;  // Macro files in plugins folder with "_" in their name
	private int userPluginsIndex; // First user plugin or submenu in Plugins menu
	private boolean addSorted;
	private int defaultFontSize = IJ.isWindows()?14:0;
	private int fontSize = Prefs.getInt(Prefs.MENU_SIZE, defaultFontSize);
	private Font menuFont;
=======
	private static boolean installingJars, duplicateCommand;
	private static Vector jarFiles;  // JAR files in plugins folder with "_" in their name
	private static Vector macroFiles;  // Macro files in plugins folder with "_" in their name
	private static int userPluginsIndex; // First user plugin or submenu in Plugins menu
	private static boolean addSorted;
	private static int defaultFontSize = IJ.isWindows()?14:0;
	private static int fontSize = Prefs.getInt(Prefs.MENU_SIZE, defaultFontSize);
	private static Font menuFont;
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
	static boolean jnlp; // true when using Java WebStart
		
	Menus(ImageJ ijInstance, ImageJApplet appletInstance) {
Solution content
	private String jarError;
	private String pluginError;
    private boolean isJarErrorHeading;
	private boolean installingJars, duplicateCommand;
	private Vector jarFiles;  // JAR files in plugins folder with "_" in their name
	private Vector macroFiles;  // Macro files in plugins folder with "_" in their name
	private int userPluginsIndex; // First user plugin or submenu in Plugins menu
	private boolean addSorted;
	private int defaultFontSize = IJ.isWindows()?14:0;
	private int fontSize = Prefs.getInt(Prefs.MENU_SIZE, defaultFontSize);
	private Font menuFont;
	static boolean jnlp; // true when using Java WebStart
		
	Menus(ImageJ ijInstance, ImageJApplet appletInstance) {
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
Method invocation
Chunk
Conflicting content
		mbar = applet == null ? null : applet.menu.getMenuBar();
		menus = new Properties();
		pluginsTable = new Hashtable();
<<<<<<< HEAD

=======
		shortcuts = new Hashtable();
		pluginsPrefs = new Vector();
		macroShortcuts = null;
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		Menu file = getMenu("File");
		Menu newMenu = getMenu("File>New", true);
		addPlugInItem(file, "Open...", "ij.plugin.Commands(\"open\")", KeyEvent.VK_O, false);
Solution content
		mbar = applet == null ? null : applet.menu.getMenuBar();
		menus = new Properties();
		pluginsTable = new Hashtable();

		Menu file = getMenu("File");
		Menu newMenu = getMenu("File>New", true);
		addPlugInItem(file, "Open...", "ij.plugin.Commands(\"open\")", KeyEvent.VK_O, false);
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
		file.addSeparator();
		addPlugInItem(file, "Close", "ij.plugin.Commands(\"close\")", KeyEvent.VK_W, false);
		addPlugInItem(file, "Save", "ij.plugin.Commands(\"save\")", KeyEvent.VK_S, false);
<<<<<<< HEAD
		Menu saveAsMenu = getMenu("File>Save As", true);
=======
		saveAsMenu = getMenu("File>Save As", true);
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		addPlugInItem(file, "Revert", "ij.plugin.Commands(\"revert\")", KeyEvent.VK_R,  false);
		file.addSeparator();
		addPlugInItem(file, "Page Setup...", "ij.plugin.filter.Printer(\"setup\")", 0, false);
Solution content
		file.addSeparator();
		addPlugInItem(file, "Close", "ij.plugin.Commands(\"close\")", KeyEvent.VK_W, false);
		addPlugInItem(file, "Save", "ij.plugin.Commands(\"save\")", KeyEvent.VK_S, false);
		Menu saveAsMenu = getMenu("File>Save As", true);
		addPlugInItem(file, "Revert", "ij.plugin.Commands(\"revert\")", KeyEvent.VK_R,  false);
		file.addSeparator();
		addPlugInItem(file, "Page Setup...", "ij.plugin.filter.Printer(\"setup\")", 0, false);
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Attribute
Method invocation
Variable
Chunk
Conflicting content
		addPlugInItem(analyzeMenu, "Surface Plot...", "ij.plugin.SurfacePlotter", 0, false);
		getMenu("Analyze>Gels", true);
		Menu toolsMenu = getMenu("Analyze>Tools", true);
<<<<<<< HEAD

		// the plugins will be added later, with a separator
		addPluginsMenu();

=======

		// the plugins will be added later, with a separator
		addPluginsMenu();

>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		Menu window = getMenu("Window");
		addPlugInItem(window, "Show All", "ij.plugin.WindowOrganizer(\"show\")", KeyEvent.VK_F, true);
		addPlugInItem(window, "Put Behind [tab]", "ij.plugin.Commands(\"tab\")", 0, false);
Solution content
		addPlugInItem(analyzeMenu, "Surface Plot...", "ij.plugin.SurfacePlotter", 0, false);
		getMenu("Analyze>Gels", true);
		Menu toolsMenu = getMenu("Analyze>Tools", true);

		// the plugins will be added later, with a separator
		addPluginsMenu();

		Menu window = getMenu("Window");
		addPlugInItem(window, "Show All", "ij.plugin.WindowOrganizer(\"show\")", KeyEvent.VK_F, true);
		addPlugInItem(window, "Put Behind [tab]", "ij.plugin.Commands(\"tab\")", 0, false);
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Chunk
Conflicting content
		addPlugInItem(help, "Update Menus", "ij.plugin.ImageJ_Updater(\"menus\")", 0, false);
		help.addSeparator();
		Menu aboutMenu = getMenu("Help>About Plugins", true);
<<<<<<< HEAD
		help.addSeparator();
		addPlugInItem(help, "ImageJA Web Site...", "ij.plugin.BrowserLauncher", 0, false);
		addPlugInItem(help, "Online Docs...", "ij.plugin.BrowserLauncher(\"online\")", 0, false);
=======
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		addPlugInItem(help, "About ImageJA...", "ij.plugin.AboutBoxJA", 0, false);
				
		if (applet==null) {
Solution content
		addPlugInItem(help, "Update Menus", "ij.plugin.ImageJ_Updater(\"menus\")", 0, false);
		help.addSeparator();
		Menu aboutMenu = getMenu("Help>About Plugins", true);
		help.addSeparator();
		addPlugInItem(help, "ImageJA Web Site...", "ij.plugin.BrowserLauncher", 0, false);
		addPlugInItem(help, "Online Docs...", "ij.plugin.BrowserLauncher(\"online\")", 0, false);
		addPlugInItem(help, "About ImageJA...", "ij.plugin.AboutBoxJA", 0, false);
				
		if (applet==null) {
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
		if (applet==null) {
			menuSeparators = new Properties();
			installPlugins();
<<<<<<< HEAD
			if (fontSize!=0)
				mbar.setFont(getFont());
		}

=======
		}


		// make	sure "Quit" is the last item in the File menu
		file.addSeparator();
		addPlugInItem(file, "Quit", "ij.plugin.Commands(\"quit\")", 0, false);

		if (fontSize!=0)
			mbar.setFont(getFont());
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		if (ij!=null && applet == null)
			ij.setMenuBar(mbar);
Solution content
		if (applet==null) {
			menuSeparators = new Properties();
			installPlugins();
			if (fontSize!=0)
				mbar.setFont(getFont());
		}

		// make	sure "Quit" is the last item in the File menu
		file.addSeparator();
		addPlugInItem(file, "Quit", "ij.plugin.Commands(\"quit\")", 0, false);
		if (ij!=null && applet == null)
			ij.setMenuBar(mbar);
File
Menus.java
Developer's decision
Combination
Kind of conflict
Comment
If statement
Method invocation
Chunk
Conflicting content
	void addPluginsMenu() {
		String value,label,className;
		int index;
<<<<<<< HEAD
		Menu pluginsMenu = getMenu("Plugins");
=======
		//pluginsMenu = new Menu("Plugins");
		pluginsMenu = getMenu("Plugins");
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		for (int count=1; count<100; count++) {
			value = Prefs.getString("plug-in" + (count/10)%10 + count%10);
			if (value==null)
Solution content
	void addPluginsMenu() {
		String value,label,className;
		int index;
		Menu pluginsMenu = getMenu("Plugins");
		for (int count=1; count<100; count++) {
			value = Prefs.getString("plug-in" + (count/10)%10 + count%10);
			if (value==null)
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
Method invocation
Variable
Chunk
Conflicting content
				pluginsMenu.addSeparator();
			else if (firstChar=='>') {
				String submenu = value.substring(2,value.length()-1);
<<<<<<< HEAD
				Menu menu = getMenu("Plugins>" + submenu, true);
=======
				//Menu menu = getMenu("Plugins>" + submenu, true);
				Menu menu = addSubMenu(pluginsMenu, submenu);
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
				if (submenu.equals("Shortcuts"))
					shortcutsMenu = menu;
				else if (submenu.equals("Utilities"))
Solution content
				pluginsMenu.addSeparator();
			else if (firstChar=='>') {
				String submenu = value.substring(2,value.length()-1);
				Menu menu = getMenu("Plugins>" + submenu, true);
				if (submenu.equals("Shortcuts"))
					shortcutsMenu = menu;
				else if (submenu.equals("Utilities"))
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
				case IMPORT_MENU: menu = getMenu("File>Import"); break;
				case SAVE_AS_MENU: menu = getMenu("File>Save As"); break;
				case SHORTCUTS_MENU: menu = shortcutsMenu; break;
<<<<<<< HEAD
				case ABOUT_MENU: menu = getMenu("Help>About"); break;
=======
				case ABOUT_MENU: menu = getMenu("Help>About Plugins"); break;
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
				case FILTERS_MENU: menu = getMenu("Process>Filters"); break;
				case TOOLS_MENU: menu = getMenu("Analyze>Tools"); break;
				case UTILITIES_MENU: menu = utilitiesMenu; break;
Solution content
				case IMPORT_MENU: menu = getMenu("File>Import"); break;
				case SAVE_AS_MENU: menu = getMenu("File>Save As"); break;
				case SHORTCUTS_MENU: menu = shortcutsMenu; break;
				case ABOUT_MENU: menu = getMenu("Help>About Plugins"); break;
				case FILTERS_MENU: menu = getMenu("Process>Filters"); break;
				case TOOLS_MENU: menu = getMenu("Analyze>Tools"); break;
				case UTILITIES_MENU: menu = utilitiesMenu; break;
File
Menus.java
Developer's decision
Version 2
Kind of conflict
Break statement
Case statement
Method invocation
Variable
Chunk
Conflicting content
			return 0;
		nMacros++;
	}

<<<<<<< HEAD
	int addPluginSeparatorIfNeeded(Menu menu) {
=======
	static int addPluginSeparatorIfNeeded(Menu menu) {
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		if (menuSeparators == null)
		Integer i = (Integer)menuSeparators.get(menu);
Solution content
		nMacros++;
	}

	int addPluginSeparatorIfNeeded(Menu menu) {
		if (menuSeparators == null)
			return 0;
		Integer i = (Integer)menuSeparators.get(menu);
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
	}

	/** Inserts 'item' into 'menu' in alphanumeric order. */
<<<<<<< HEAD
	void addOrdered(Menu menu, MenuItem item) {
=======
	static void addOrdered(Menu menu, MenuItem item) {
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		String label = item.getLabel();
		int start = addPluginSeparatorIfNeeded(menu);
		for (int i=start; i
Solution content
	}

	/** Inserts 'item' into 'menu' in alphanumeric order. */
	void addOrdered(Menu menu, MenuItem item) {
		String label = item.getLabel();
		int start = addPluginSeparatorIfNeeded(menu);
		for (int i=start; i
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
			int comma = name.indexOf(',');
			if (comma >= 0)
				name = name.substring(0, comma);
<<<<<<< HEAD

=======
			if (name.startsWith("Help>About")) // for backward compatibility
				name = "Help>About Plugins";
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
			menu = getMenu(name);
		}
		int firstQuote = s.indexOf('"');
Solution content
			int comma = name.indexOf(',');
			if (comma >= 0)
				name = name.substring(0, comma);
			if (name.startsWith("Help>About")) // for backward compatibility
				name = "Help>About Plugins";
			menu = getMenu(name);
		}
		int firstQuote = s.indexOf('"');
File
Menus.java
Developer's decision
Version 2
Kind of conflict
If statement
Chunk
Conflicting content
            }
    }

<<<<<<< HEAD
	private Menu getMenu(String menuName) {
		return getMenu(menuName, false);
	}

	private Menu getMenu(String menuName, boolean readFromProps) {
=======
	private static Menu getMenu(String menuName) {
		return getMenu(menuName, false);
	}

	private static Menu getMenu(String menuName, boolean readFromProps) {
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		if (menuName.endsWith(">"))
			menuName = menuName.substring(0, menuName.length() - 1);
		Menu result = (Menu)menus.get(menuName);
Solution content
            }
    }

	private Menu getMenu(String menuName) {
		return getMenu(menuName, false);
	}

	private Menu getMenu(String menuName, boolean readFromProps) {
		if (menuName.endsWith(">"))
			menuName = menuName.substring(0, menuName.length() - 1);
		Menu result = (Menu)menus.get(menuName);
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Method signature
Chunk
Conflicting content
			int offset = menuName.lastIndexOf('>');
			if (offset < 0) {
				result = new PopupMenu(menuName);
<<<<<<< HEAD
				if (mbar == null) {
					if (applet == null)
						mbar = new MenuBar();
					else
						mbar = applet.menu.getMenuBar();
				}
=======
				if (mbar == null)
					mbar = new MenuBar();
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
				if (menuName.equals("Help"))
					mbar.setHelpMenu(result);
				else
Solution content
			int offset = menuName.lastIndexOf('>');
			if (offset < 0) {
				result = new PopupMenu(menuName);
				if (mbar == null) {
					if (applet == null)
						mbar = new MenuBar();
					else
						mbar = applet.menu.getMenuBar();
				}
				if (menuName.equals("Help"))
					mbar.setHelpMenu(result);
				else
File
Menus.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
				if (readFromProps)
					result = addSubMenu(parentMenu,
							menuItemName);
<<<<<<< HEAD
				else if (parentName.startsWith("Plugins") &&
						menuSeparators != null)
					addItemSorted(parentMenu, result,
						parentName.equals("Plugins") ?
							userPluginsIndex : 0);
=======
				else if (parentName.startsWith("Plugins") && menuSeparators != null)
					addItemSorted(parentMenu, result, parentName.equals("Plugins")?userPluginsIndex:0);
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
				else
					parentMenu.add(result);
				if (menuName.equals("File>Open Recent"))
Solution content
				if (readFromProps)
					result = addSubMenu(parentMenu,
							menuItemName);
				else if (parentName.startsWith("Plugins") && menuSeparators != null)
					addItemSorted(parentMenu, result, parentName.equals("Plugins")?userPluginsIndex:0);
				else
					parentMenu.add(result);
				if (menuName.equals("File>Open Recent"))
File
Menus.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
	}
	
	/** Looks for plugins and jar files in a subdirectory of the plugins directory. */
<<<<<<< HEAD
	private void checkSubdirectory(String path, String dir, Vector v) {
=======
	private static void checkSubdirectory(String path, String dir, Vector v) {
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		if (dir.endsWith(".java"))
			return;
		File f = new File(path, dir);
Solution content
	}
	
	/** Looks for plugins and jar files in a subdirectory of the plugins directory. */
	private void checkSubdirectory(String path, String dir, Vector v) {
		if (dir.endsWith(".java"))
			return;
		File f = new File(path, dir);
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
		installUserPlugin(className, false);
	}

<<<<<<< HEAD
	public static void forceInstallUserPlugin(String className) {
		instance.installUserPlugin(className, true);
	}

	private void installUserPlugin(String className, boolean force) {
=======
	public void installUserPlugin(String className, boolean force) {
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		int slashIndex = className.indexOf('/');
		String menuName = slashIndex < 0 ? "Plugins" : "Plugins>" +
			className.substring(0, slashIndex).replace('/', '>');
Solution content
		installUserPlugin(className, false);
	}

	public static void forceInstallUserPlugin(String className) {
		instance.installUserPlugin(className, true);
	}

	private void installUserPlugin(String className, boolean force) {
		int slashIndex = className.indexOf('/');
		String menuName = slashIndex < 0 ? "Plugins" : "Plugins>" +
			className.substring(0, slashIndex).replace('/', '>');
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Method signature
Chunk
Conflicting content
		String menuName = slashIndex < 0 ? "Plugins" : "Plugins>" +
			className.substring(0, slashIndex).replace('/', '>');
		Menu menu = getMenu(menuName);
<<<<<<< HEAD
	String command = className;
	if (slashIndex>0) {
		command = className.substring(slashIndex+1);
	}
=======
		String command = className;
		if (slashIndex>0) {
			command = className.substring(slashIndex+1);
		}
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		command = command.replace('_',' ');
		command.trim();
		boolean itemExists = (pluginsTable.get(command)!=null);
Solution content
		String menuName = slashIndex < 0 ? "Plugins" : "Plugins>" +
			className.substring(0, slashIndex).replace('/', '>');
		Menu menu = getMenu(menuName);
		String command = className;
		if (slashIndex>0) {
			command = className.substring(slashIndex+1);
		}
		command = command.replace('_',' ');
		command.trim();
		boolean itemExists = (pluginsTable.get(command)!=null);
File
Menus.java
Developer's decision
Version 1
Kind of conflict
If statement
Variable
Chunk
Conflicting content
	/** Returns the hashtable that associates keyboard shortcuts with macros. The keys
		in the hashtable are Integer keycodes, or keycode+200 for uppercase. */
	public static Hashtable getMacroShortcuts() {
<<<<<<< HEAD
		if (instance.macroShortcuts==null)
			instance.macroShortcuts = new Hashtable();
		return instance.macroShortcuts;
=======
		if (macroShortcuts==null)
			macroShortcuts = new Hashtable();
		return macroShortcuts;
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
	}
        
	/** Inserts one item (a non-image window) into the Window menu. */
Solution content
			instance.macroShortcuts = new Hashtable();
	/** Returns the hashtable that associates keyboard shortcuts with macros. The keys
		in the hashtable are Integer keycodes, or keycode+200 for uppercase. */
	public static Hashtable getMacroShortcuts() {
		if (instance.macroShortcuts==null)
		return instance.macroShortcuts;
	}
        
	/** Inserts one item (a non-image window) into the Window menu. */
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Attribute
If statement
Return statement
Chunk
Conflicting content
			case IMPORT_MENU: menu = getMenu("File>Import"); break;
			case SAVE_AS_MENU: menu = getMenu("File>Save As"); break;
			case SHORTCUTS_MENU: menu = shortcutsMenu; break;
<<<<<<< HEAD
			case ABOUT_MENU: menu = getMenu("Help>About"); break;
=======
			case ABOUT_MENU: menu = getMenu("Help>About Plugins"); break;
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
			case FILTERS_MENU: menu = getMenu("Process>Filters"); break;
			case TOOLS_MENU: menu = getMenu("Analyze>Tools"); break;
			case UTILITIES_MENU: menu = utilitiesMenu; break;
Solution content
			case IMPORT_MENU: menu = getMenu("File>Import"); break;
			case SAVE_AS_MENU: menu = getMenu("File>Save As"); break;
			case SHORTCUTS_MENU: menu = shortcutsMenu; break;
			case ABOUT_MENU: menu = getMenu("Help>About Plugins"); break;
			case FILTERS_MENU: menu = getMenu("Process>Filters"); break;
			case TOOLS_MENU: menu = getMenu("Analyze>Tools"); break;
			case UTILITIES_MENU: menu = utilitiesMenu; break;
File
Menus.java
Developer's decision
Version 2
Kind of conflict
Break statement
Case statement
Method invocation
Variable
Chunk
Conflicting content
	}
	
	public static void updateImageJMenus() {
<<<<<<< HEAD
=======
		jarFiles = macroFiles = null;
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		Menus m = new Menus(IJ.getInstance(),
				(ImageJApplet)IJ.getApplet());
		String err = m.addMenuBar();
Solution content
	}
	
	public static void updateImageJMenus() {
		Menus m = new Menus(IJ.getInstance(),
				(ImageJApplet)IJ.getApplet());
		String err = m.addMenuBar();
File
Menus.java
Developer's decision
Version 1
Kind of conflict
Attribute
Chunk
Conflicting content
		text[k++] = "http://imageja.sourceforge.net/";
		text[k++] = "Based on ImageJ";
		text[k++] = IJ.URL;
<<<<<<< HEAD
		text[k++] = "Java "+System.getProperty("java.version");
=======
		text[k++] = "Java "+System.getProperty("java.version")+(IJ.is64Bit()?" (64-bit)":" (32-bit)");
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		text[k++] = IJ.freeMemory();
		text[k++] = "ImageJA is in the public domain";
		ImageProcessor ip = null;
Solution content
		text[k++] = "http://imageja.sourceforge.net/";
		text[k++] = "Based on ImageJ";
		text[k++] = IJ.URL;
		text[k++] = "Java "+System.getProperty("java.version")+(IJ.is64Bit()?" (64-bit)":" (32-bit)");
		text[k++] = IJ.freeMemory();
		text[k++] = "ImageJA is in the public domain";
		ImageProcessor ip = null;
File
AboutBoxJA.java
Developer's decision
Version 2
Kind of conflict
Array access
Method invocation
Chunk
Conflicting content
			return;
		}
		// insert into menu
<<<<<<< HEAD
		Menus.forceInstallUserPlugin(className);
=======
		Menus.updateImageJMenus();
>>>>>>> 6c2de506c2bf2ed5ce75ff18e527632d2a787192
		IJ.showMessage("PluginInstaller","Plugin "+className+" successfully installed!");
	}
Solution content
			return;
		}
		// insert into menu
		Menus.forceInstallUserPlugin(className);
		IJ.showMessage("PluginInstaller","Plugin "+className+" successfully installed!");
	}
File
PlugInInstaller.java
Developer's decision
Version 1
Kind of conflict
Method invocation