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