for (PackageIndex index : packageIndices) {
for (Package pkg : index.getPackages()) {
for (ArduinoPlatform curPlatform : pkg.getInstalledPlatforms()) {
if (architecture.equalsIgnoreCase(curPlatform.getArchitecture())
&& (vendor.equalsIgnoreCase(pkg.getMaintainer()))) {
<BUG>ArduinoPlatform latestPlatform = pkg.getLatestPlatform(curPlatform.getName());
return new org.eclipse.core.runtime.Path(latestPlatform.getPlatformFile().toString());
</BUG>
}
}

for (PackageIndex index : packageIndices) {
Package pkg = index.getPackage(packageName);
if (pkg != null) {
ArduinoPlatform platform = pkg.getLatestPlatform(platformName);
if (platform != null) {
Board board = platform.getBoard(boardName);
if (board != null) {
return board;
