CPD Results

The following document contains the results of PMD's CPD 3.9.

Duplications

FileLine
net\sf\firemox\ui\layout\FlowLayout2.java68
net\sf\firemox\ui\layout\FlowLayout2Center.java69
	public FlowLayout2Center(int hgap, int vgap) {
		this.hgap = hgap;
		this.vgap = vgap;
	}

	/**
	 * Gets the horizontal gap between components and between the components and
	 * the borders of the <code>Container</code>
	 * 
	 * @return the horizontal gap between components and between the components
	 *         and the borders of the <code>Container</code>
	 * @see java.awt.FlowLayout#setHgap
	 * @since JDK1.1
	 */
	public int getHgap() {
		return hgap;
	}

	/**
	 * Sets the horizontal gap between components and between the components and
	 * the borders of the <code>Container</code>.
	 * 
	 * @param hgap
	 *          the horizontal gap between components and between the components
	 *          and the borders of the <code>Container</code>
	 * @see java.awt.FlowLayout#getHgap
	 * @since JDK1.1
	 */
	public void setHgap(int hgap) {
		this.hgap = hgap;
	}

	/**
	 * Gets the vertical gap between components and between the components and the
	 * borders of the <code>Container</code>.
	 * 
	 * @return the vertical gap between components and between the components and
	 *         the borders of the <code>Container</code>
	 * @see java.awt.FlowLayout#setVgap
	 * @since JDK1.1
	 */
	public int getVgap() {
		return vgap;
	}

	/**
	 * Sets the vertical gap between components and between the components and the
	 * borders of the <code>Container</code>.
	 * 
	 * @param vgap
	 *          the vertical gap between components and between the components and
	 *          the borders of the <code>Container</code>
	 * @see java.awt.FlowLayout#getVgap
	 * @since JDK1.1
	 */
	public void setVgap(int vgap) {
		this.vgap = vgap;
	}

	public void addLayoutComponent(String name, Component comp) {
		// Ignore this event
	}

	public void removeLayoutComponent(Component comp) {
		// Ignore this event
	}

	public Dimension preferredLayoutSize(Container target) {
		synchronized (target.getTreeLock()) {
			Dimension dim = new Dimension(0, 0);
			int nmembers = target.getComponentCount();
			boolean firstVisibleComponent = true;

			for (int i = 0; i < nmembers; i++) {
				Component m = target.getComponent(i);
				if (m.isVisible()) {
					Dimension d = m.getPreferredSize();
					dim.height = Math.max(dim.height, d.height);
					if (firstVisibleComponent) {
						firstVisibleComponent = false;
					} else {
						dim.width += hgap;
					}
					dim.width += d.width;
				}
			}
			Insets insets = target.getInsets();
			dim.width += insets.left + insets.right + hgap * 2;
			dim.height += insets.top + insets.bottom + vgap * 2;
			return dim;
		}
	}

	public Dimension minimumLayoutSize(Container target) {
		synchronized (target.getTreeLock()) {
			Dimension dim = new Dimension(0, 0);
			int nmembers = target.getComponentCount();

			for (int i = 0; i < nmembers; i++) {
				Component m = target.getComponent(i);
				if (m.isVisible()) {
					Dimension d = m.getMinimumSize();
					dim.height = Math.max(dim.height, d.height);
					if (i > 0) {
						dim.width += hgap;
					}
					dim.width += d.width;
				}
			}
			Insets insets = target.getInsets();
			dim.width += insets.left + insets.right + hgap * 2;
			dim.height += insets.top + insets.bottom + vgap * 2;
			return dim;
		}
	}

	public void layoutContainer(Container target) {
		synchronized (target.getTreeLock()) {
			Insets insets = target.getInsets();
			int maxwidth = target.getWidth()
					- (insets.left + insets.right + hgap * 2);
			int nmembers = target.getComponentCount();
			int x = 0;

FileLine
net\sf\firemox\xml\magic\Oracle2Xml.java1260
net\sf\firemox\xml\magic\Oracle2XmlNoRules.java173
				out.println("</card>");
				IOUtils.closeQuietly(out);
				nbCard++;
			}
		} catch (FileNotFoundException e) {
			System.err.println("Error openning file '" + oracleFile + "' : " + e);
		} catch (IOException e) {
			System.err.println("IOError reading file '" + oracleFile + "' : " + e);
		}
		System.out.println("Success Parsing : " + nbCard + " card(s)");
	}

	/**
	 * <ul>
	 * Argument are (in this order :
	 * <li>Oracle source file
	 * <li>destination directory
	 * </ul>
	 * 
	 * @param args
	 */
	public static void main(String... args) {
		options = new Options();
		final CmdLineParser parser = new CmdLineParser(options);
		try {
			parser.parseArgument(args);
		} catch (CmdLineException e) {
			// Display help
			if (!options.isHelp()) {
				System.out.println("Wrong parameters : " + e.getMessage());
			} else {
				System.out.println("Usage");
			}
			parser.setUsageWidth(100);
			parser.printUsage(System.out);
			System.exit(-1);
			return;
		}

		if (options.isVersion()) {
			// Display version
			System.out.println("Version is " + IdConst.VERSION);
			System.exit(-1);
			return;
		}

		if (options.isHelp()) {
			// Display help
			System.out.println("Usage");
			parser.setUsageWidth(100);
			parser.printUsage(System.out);
			System.exit(-1);
			return;
		}

		// The oracle source file
		final String oracle = options.getOracleFile();

		// the directory destination end with the file separator
		String destination = FilenameUtils.separatorsToWindows(options
				.getDestination());
		if (!destination.endsWith("/")) {
			destination += "/";
		}

		// Create the destination directories
		try {
			new File(destination).mkdirs();
		} catch (Exception e) {
			// Ignore this error and continue
		}
		new Oracle2XmlNoRules().serialize(MToolKit.getFile(oracle), MToolKit

FileLine
net\sf\firemox\action\InputProperty.java86
net\sf\firemox\action\InputZone.java84
					new net.sf.firemox.ui.wizard.InputZone(ability, text, zones));
		} else {
			Log.debug("Waiting for opponent's answer");
		}
		return false;
	}

	@Override
	public final CoreMessageType getMessagingActionId() {
		return CoreMessageType.COLOR_ANSWER;
	}

	@Override
	protected void setAnswer(int optionAnswer, int indexAnswer,
			ContextEventListener context, Ability ability,
			ActionContextWrapper actionContext) {
		if (optionAnswer == JOptionPane.NO_OPTION) {
			((IntValue) registerModifier.valueExpr).value = 0;
		} else {
			((IntValue) registerModifier.valueExpr).value = indexAnswer;
		}
		if (actionContext != null) {
			actionContext.actionContext = new Int(
					((IntValue) registerModifier.valueExpr).value);
		}
		if (registerModifier.play(context, ability)) {
			StackManager.resolveStack();
		}
	}

	@Override
	public String toString(Ability ability) {
		return LanguageManagerMDB.getString("choosezone.action");
	}

	@Override
	public final boolean replay(ActionContextWrapper actionContext,
			ContextEventListener context, Ability ability) {
		((IntValue) registerModifier.valueExpr).value = ((Int) actionContext.actionContext)
				.getInt();
		return registerModifier.play(context, ability);
	}

	/**
	 * The register modifiaction action using the answer as input.
	 */
	private final ModifyRegister registerModifier;

	/**
	 * The allowed zone
	 */
	private final ListExpression allowedZones;

FileLine
net\sf\firemox\xml\magic\Oracle2Xml.java111
net\sf\firemox\xml\magic\Oracle2XmlNoRules.java107
								+ fileName);
						File tempFile = File.createTempFile(fileName, "temp");
						FileUtils.copyFile(patchFile, tempFile);
						final BufferedReader inExist = new BufferedReader(new FileReader(
								tempFile));
						final PrintWriter outExist = new PrintWriter(new FileOutputStream(
								patchFile));
						String lineExist = null;
						boolean found = false;
						while ((lineExist = inExist.readLine()) != null) {
							if (!found && lineExist.contains("name=\"")) {
								lineExist = lineExist
										.substring(0, lineExist.indexOf("name=\""))
										+ "name=\""
										+ cardName
										+ lineExist.substring(lineExist.indexOf("\"", lineExist
												.indexOf("name=\"")
												+ "name=\"".length() + 2));
								found = true;
							}
							outExist.println(lineExist);
						}
						IOUtils.closeQuietly(inExist);
						IOUtils.closeQuietly(outExist);

						if (!found) {
							System.err.println(">> Error patching card '" + cardName + "'");
							// } else {
							// patching card
						}
					}
					skipCard(in);
					continue;
				}

				out = new PrintWriter(new FileOutputStream(new File(destinationDir,
						fileName)));

FileLine
net\sf\firemox\modifier\ObjectAbilityModifier.java60
net\sf\firemox\modifier\ObjectColorModifier.java60
			StackManager.postRefreshIdCard(to);
			return next;
		}
		return super.removeObject(objectName, objectTest);
	}

	@Override
	public int paintObject(Graphics g, int startX, int startY) {
		if (main) {
			if (startX + 13 > CardFactory.cardWidth) {
				return paintObject(g, 3, startY - 16);
			}
			g.drawImage(objectPicture, startX, startY, 13, 15, null);
			return super.paintObject(g, startX + 3, startY);
		}
		return super.paintObject(g, startX, startY);
	}

	@Override
	public int getNbObjects(String objectName, Test objectTest) {
		if (main && objectName.equals(name) && objectTest.test(ability, to)) {
			if (next == null) {
				return 1;
			}
			return 1 + next.getNbObjects(objectName, objectTest);
		}
		return super.getNbObjects(objectName, objectTest);
	}

	/**
	 * Picture representing this object
	 */
	private Image objectPicture;

	/**
	 * is this object modifier is the main modifier
	 */
	private boolean main;
}

FileLine
net\sf\firemox\modifier\ObjectAbilityModifier.java60
net\sf\firemox\modifier\ObjectRegisterModifier.java62
			StackManager.postRefreshRegisters(to, index);
			return next;
		}
		return super.removeObject(objectName, objectTest);
	}

	@Override
	public int paintObject(Graphics g, int startX, int startY) {
		if (main) {
			if (startX + 13 > CardFactory.cardWidth) {
				return paintObject(g, 3, startY - 16);
			}
			g.drawImage(objectPicture, startX, startY, 13, 15, null);
			return super.paintObject(g, startX + 3, startY);
		}
		return super.paintObject(g, startX, startY);
	}

	@Override
	public int getNbObjects(String objectName, Test objectTest) {
		if (main && objectName.equals(name) && objectTest.test(ability, to)) {
			if (next == null) {
				return 1;
			}
			return 1 + next.getNbObjects(objectName, objectTest);
		}
		return super.getNbObjects(objectName, objectTest);
	}

	/**
	 * Picture representing this object
	 */
	private Image objectPicture;

	/**
	 * is this object modifier is the main modifier
	 */
	private boolean main;
}

FileLine
net\sf\firemox\expression\HighestAmong.java50
net\sf\firemox\expression\LowestAmong.java50
	public LowestAmong(InputStream inputFile) throws IOException {
		super();
		restrictionZone = inputFile.read() - 1;
		test = TestFactory.readNextTest(inputFile);
		expr = ExpressionFactory.readNextExpression(inputFile);
	}

	@Override
	public int getValue(Ability ability, Target tested,
			ContextEventListener context) {
		final List<Target> validTargets = new ArrayList<Target>();
		if (restrictionZone != -1) {
			StackManager.PLAYERS[StackManager.idCurrentPlayer].zoneManager
					.getContainer(restrictionZone).checkAllCardsOf(test, validTargets,
							ability);
			StackManager.PLAYERS[1 - StackManager.idCurrentPlayer].zoneManager
					.getContainer(restrictionZone).checkAllCardsOf(test, validTargets,
							ability);
		} else {
			StackManager.PLAYERS[StackManager.idCurrentPlayer].zoneManager
					.checkAllCardsOf(test, validTargets, ability);
			StackManager.PLAYERS[1 - StackManager.idCurrentPlayer].zoneManager
					.checkAllCardsOf(test, validTargets, ability);
		}
		int lowest = 0;

FileLine
net\sf\firemox\action\AssignDamageSourceDest.java83
net\sf\firemox\action\AssignDamageTarget.java86
		final MCard source = StackManager.getRealSource(ability.getCard());
		if (!target.isCard() || checkTimeStamp(context, (MCard) target)
				&& ((MCard) target).getIdZone() == IdZones.PLAY) {

			if (!AssignedDamage.tryAction(source, target, value, type)) {
				// this action has been replaced
				return false;
			}

			if (value > 0) {
				AssignedDamage.dispatchEvent(source, target, value, type);
			}
		}
		return true;
	}

	@Override
	public String toString(Ability ability) {
		try {
			if (valueExpr.getValue(ability, null, null) == IdConst.ALL) {
				return LanguageManagerMDB.getString("assign-damage-target-all");
			}
			return LanguageManagerMDB.getString("assign-damage-target", valueExpr
					.getValue(ability, null, null));
		} catch (Exception e) {
			return LanguageManagerMDB.getString("assign-damage-target", "?");
		}
	}

	/**
	 * The complex expression to use for the right value. Is null if the IdToken
	 * number is not a complex expression.
	 */
	private Expression valueExpr = null;

FileLine
net\sf\firemox\action\InputColor.java94
net\sf\firemox\action\InputZone.java84
							text, properties));
		} else {
			Log.debug("Waiting for opponent's answer");
		}
		return false;
	}

	@Override
	public final CoreMessageType getMessagingActionId() {
		return CoreMessageType.COLOR_ANSWER;
	}

	@Override
	protected void setAnswer(int optionAnswer, int indexAnswer,
			ContextEventListener context, Ability ability,
			ActionContextWrapper actionContext) {
		if (optionAnswer == JOptionPane.NO_OPTION) {
			((IntValue) registerModifier.valueExpr).value = 0;
		} else {
			((IntValue) registerModifier.valueExpr).value = indexAnswer;
		}
		if (actionContext != null) {
			actionContext.actionContext = new Int(
					((IntValue) registerModifier.valueExpr).value);
		}
		if (registerModifier.play(context, ability)) {
			StackManager.resolveStack();
		}
	}

	@Override
	public String toString(Ability ability) {
		return LanguageManagerMDB.getString("choosezone.action");

FileLine
net\sf\firemox\stack\TargetHelper.java152
net\sf\firemox\stack\TargetHelper.java191
			if (choiceMode == IdTargets.ALL) {
				return true;
			}
			if (restrictionZone != -1) {
				if (StackManager.PLAYERS[0].zoneManager.getContainer(restrictionZone)
						.countAllCardsOf(test, ability, hopCounter, canBePreempted) >= hopCounter) {
					return true;
				}
				if (StackManager.PLAYERS[1].zoneManager.getContainer(restrictionZone)
						.countAllCardsOf(test, ability, hopCounter, canBePreempted) >= hopCounter) {
					return true;
				}
			} else {
				if (StackManager.PLAYERS[0].zoneManager.countAllCardsOf(test, ability,
						hopCounter, canBePreempted) >= hopCounter) {
					return true;
				}
				if (StackManager.PLAYERS[1].zoneManager.countAllCardsOf(test, ability,
						hopCounter, canBePreempted) >= hopCounter) {
					return true;
				}
			}
			// no valid card
			return false;

FileLine
net\sf\firemox\xml\action\Givemana.java92
net\sf\firemox\xml\action\Paymana.java84
			String braAttr = node.getAttribute("value");
			if (braAttr != null) {
				// register mode
				MToolKit.writeInt16(out, IdTokens.MANA_POOL);
				XmlTools.writeTestOn(out, node.getAttribute("card"));
			} else {
				MToolKit.writeInt16(out, 0); // dummy mode
				for (int i = 0; i < IdCommonToken.COLOR_NAMES.length; i++) {
					if (node.getAttribute(IdCommonToken.COLOR_NAMES[i]) == null
							&& node.get(IdCommonToken.COLOR_NAMES[i]) == null) {
						// no such mana to pay for this color, so 0
						IdOperation.INT_VALUE.serialize(out);
						MToolKit.writeInt16(out, 0);
					} else {
						XmlTools.writeAttrOptions(node, IdCommonToken.COLOR_NAMES[i], out);
					}
				}
			}
		}
		return 1;
	}

}

FileLine
net\sf\firemox\tools\Picture.java163
net\sf\firemox\tools\Picture.java204
						+ FileUtils.byteCountToDisplaySize(contentLength) + ")");

				// Step 2: read and write until done
				byte[] buf = new byte[2048];
				int currentLength = 0;
				boolean succeed = false;
				for (int bufferLen = in.read(buf); bufferLen >= 0; bufferLen = in
						.read(buf)) {
					if (!succeed) {
						toDownload.getParentFile().mkdirs();
						out = new BufferedOutputStream(new FileOutputStream(localFile));
						succeed = true;
					}
					currentLength += bufferLen;
					if (out != null) {
						out.write(buf, 0, bufferLen);
					}
					if (listener != null) {
						listener.updateProgress(contentLength, currentLength);
					}
				}

				// Step 3: close streams
				IOUtils.closeQuietly(in);
				IOUtils.closeQuietly(out);
				in = null;
				out = null;
				return;
			} catch (IOException e1) {

FileLine
net\sf\firemox\xml\magic\Oracle2Xml.java66
net\sf\firemox\xml\magic\Oracle2XmlNoRules.java61
	private Oracle2XmlNoRules() {
		super();
	}

	/**
	 * @param oracleFile
	 *          the oracle format text file.
	 * @param destinationDir
	 *          the directory where built card will be placed.
	 * @param recycledDir
	 *          the directory where already built card are placed.
	 */
	@SuppressWarnings("null")
	public void serialize(File oracleFile, File destinationDir, File recycledDir) {
		if (!oracleFile.exists() || !oracleFile.isFile()) {
			System.err.println("The file '" + oracleFile + "' does not exist");
			System.exit(-1);
			return;
		}

		if (!destinationDir.exists() || !destinationDir.isDirectory()) {
			System.err.println("The destination directory '" + destinationDir
					+ "' does not exist");
			System.exit(-1);
			return;
		}
		final StringBuilder cardText = new StringBuilder();
		int nbCard = 0;
		MToolKit.tbsName = "norules-mtg";

FileLine
net\sf\firemox\action\TargetRandomNoEvent.java106
net\sf\firemox\expression\HighestAmong.java60
		final List<Target> validTargets = new ArrayList<Target>();
		if (restrictionZone != -1) {
			StackManager.PLAYERS[StackManager.idCurrentPlayer].zoneManager
					.getContainer(restrictionZone).checkAllCardsOf(test, validTargets,
							ability);
			StackManager.PLAYERS[1 - StackManager.idCurrentPlayer].zoneManager
					.getContainer(restrictionZone).checkAllCardsOf(test, validTargets,
							ability);
		} else {
			StackManager.PLAYERS[StackManager.idCurrentPlayer].zoneManager
					.checkAllCardsOf(test, validTargets, ability);
			StackManager.PLAYERS[1 - StackManager.idCurrentPlayer].zoneManager
					.checkAllCardsOf(test, validTargets, ability);
		}

FileLine
net\sf\firemox\expression\Counter.java119
net\sf\firemox\test\Has.java60
	}

	@Override
	public void extractTriggeredEvents(List<MEventListener> res, MCard source,
			Test globalTest) {
		if (test != null) {
			test.extractTriggeredEvents(res, source, globalTest);
			if (restrictionZone != -1) {
				res.add(new MovedCard(IdZones.PLAY, new InZone(restrictionZone,
						TestOn.TESTED), globalTest, source));
				res.add(new MovedCard(IdZones.PLAY, True.getInstance(), And.append(
						new InZone(restrictionZone, TestOn.TESTED), globalTest), source));
			}
		}
	}

FileLine
net\sf\firemox\chart\datasets\BarDataset.java45
net\sf\firemox\chart\datasets\CategoryDataset.java45
	public CategoryDataset(IDataProvider provider, ChartFilter filter) {
		super();
		this.provider = provider;
		this.filter = filter;
		this.workingKeys = new ArrayList<IChartKey>();
	}

	/**
	 * Add cards to all data sets.
	 * 
	 * @param cardModel
	 *          the card to add.
	 * @param amount
	 *          the amount of card to add.
	 */
	public void addCard(final CardModel cardModel, final int amount) {
		for (IChartKey key : provider.getKeys(cardModel, filter)) {
			if (workingKeys.contains(key)) {
				try {
					setValue(key, Integer.valueOf(getValue("My Key", key).intValue()
							+ amount));
				} catch (Exception e) {
					e.printStackTrace();
				}
			} else {

FileLine
net\sf\firemox\action\objectmap\ObjectMapRemove.java59
net\sf\firemox\action\objectmap\ObjectMapSave.java65
				testOn.getTargetable(ability, null));
		return true;
	}

	@Override
	public String toString(Ability ability) {
		return "";
	}

	public void simulate(ActionContextWrapper actionContext,
			ContextEventListener context, Ability ability) {
		final Wrapper<Target> mapContext = new Wrapper<Target>();
		actionContext.actionContext = mapContext;
		mapContext.setObject(ability.getTargetable().getPrivateNamedObject(
				objectName));
		play(context, ability);
	}

	public void rollback(ActionContextWrapper actionContext,
			ContextEventListener context, Ability ability) {
		final Target oldTargetable = (Target) ((Wrapper<?>) actionContext.actionContext)
				.getObject();
		if (oldTargetable == null) {

FileLine
net\sf\firemox\event\ModifiedRegister.java175
net\sf\firemox\event\ModifiedRegister.java231
		if (pSource == SystemCard.instance
				&& StackManager.getInstance().getAbilityContext() != null
				&& StackManager.triggered.getAbilityContext() instanceof MContextCardCardIntInt
				&& ((MContextCardCardIntInt) StackManager.triggered.getAbilityContext())
						.getCard2() != null) {
			source = ((MContextCardCardIntInt) StackManager.triggered
					.getAbilityContext()).getCard2();
		}

		final int context2 = StackManager.getInstance().getAbilityContext() != null
				&& StackManager.triggered.getAbilityContext() instanceof MContextCardCardIntInt ? ((MContextCardCardIntInt) StackManager.triggered
				.getAbilityContext()).getValue2()
				: 0;

FileLine
net\sf\firemox\action\ZoneVisibility.java122
net\sf\firemox\action\ZoneVisibility.java165
	public boolean replay(ActionContextWrapper actionContext,
			ContextEventListener context, Ability ability) {
		ObjectArray<Visibility> contextN = (ObjectArray<Visibility>) actionContext.actionContext;
		for (int i = StackManager.getInstance().getTargetedList().size(); i-- > 0;) {
			if (StackManager.getInstance().getTargetedList().get(i).isPlayer()) {
				final Player player = (Player) StackManager.getInstance()
						.getTargetedList().get(i);
				player.zoneManager.getContainer(idZone).setVisibility(
						contextN.getObject(i * 2 + 1));

FileLine
net\sf\firemox\action\TargetAllNoEvent.java97
net\sf\firemox\action\TargetAllNoEvent.java127
			if (restrictionZone != -1) {
				StackManager.PLAYERS[StackManager.idCurrentPlayer].zoneManager
						.getContainer(restrictionZone).checkAllCardsOf(test, validTargets,
								ability);
				StackManager.PLAYERS[1 - StackManager.idCurrentPlayer].zoneManager
						.getContainer(restrictionZone).checkAllCardsOf(test, validTargets,
								ability);
			} else {
				StackManager.PLAYERS[StackManager.idCurrentPlayer].zoneManager
						.checkAllCardsOf(test, validTargets, ability);
				StackManager.PLAYERS[1 - StackManager.idCurrentPlayer].zoneManager
						.checkAllCardsOf(test, validTargets, ability);
			}
			break;

FileLine
net\sf\firemox\action\AddObject.java89
net\sf\firemox\action\MoveObject.java90
				objectName.replaceAll("/", ""), from.toString(), to.toString())
				.replaceAll("%n", "" + times);
	}

	@Override
	public String toHtmlString(Ability ability, ContextEventListener context) {
		if (actionName != null) {
			if (actionName.charAt(0) == '%') {
				return "";
			}
			if (actionName.charAt(0) == '@') {
				final String picture = ActionFactory.PICTURES.get(actionName);
				if (picture != null) {
					return toHtmlString(ability, picture);
				}
			} else {
				return LanguageManagerMDB.getString(actionName);
			}
		}
		return LanguageManagerMDB.getString("moveobject-1", objectName.replaceAll(

FileLine
net\sf\firemox\action\TargetAllNoEvent.java97
net\sf\firemox\expression\LowestAmong.java61
			if (restrictionZone != -1) {
				StackManager.PLAYERS[StackManager.idCurrentPlayer].zoneManager
						.getContainer(restrictionZone).checkAllCardsOf(test, validTargets,
								ability);
				StackManager.PLAYERS[1 - StackManager.idCurrentPlayer].zoneManager
						.getContainer(restrictionZone).checkAllCardsOf(test, validTargets,
								ability);
			} else {
				StackManager.PLAYERS[StackManager.idCurrentPlayer].zoneManager
						.checkAllCardsOf(test, validTargets, ability);
				StackManager.PLAYERS[1 - StackManager.idCurrentPlayer].zoneManager
						.checkAllCardsOf(test, validTargets, ability);
			}

FileLine
net\sf\firemox\xml\tbs\Replacementability.java85
net\sf\firemox\xml\tbs\Systemability.java63
		node.addAttribute(new XmlParser.Attribute("zone", "play"));
		Iterator<?> it = node.iterator();
		XmlTools.defaultOnMeTag = false;
		while (it.hasNext()) {
			Object obj = it.next();
			if (obj instanceof XmlParser.Node) {
				XmlParser.Node child = (XmlParser.Node) obj;
				if ("text".equals(child.getTag())) {
					System.out.println("text element in ability is not yet implement");
				} else {
					XmlEvent.getEvent(child.getTag()).buildMdb(child, out);
					break;
				}
			}
		}

FileLine
net\sf\firemox\xml\magic\Oracle2Xml.java95
net\sf\firemox\xml\magic\Oracle2XmlNoRules.java90
		try {
			final BufferedReader in = new BufferedReader(new FileReader(oracleFile));
			PrintWriter out = null;
			while (nbCard < MAXI) {
				String line = in.readLine();
				if (line == null)
					break;
				String cardName = line.trim();
				if (cardName.length() == 0) {
					continue;
				}

				// a new card starts
				String fileName = MToolKit.getExactKeyName(cardName) + ".xml";
				if (new File(recycledDir, fileName).exists()) {
					if (UPDATE_CARD) {
						File patchFile = MToolKit.getFile("tbs/norules-mtg/recycled/"