rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
if (foundQuantityInputParam) { | if (foundQuantityInputParam && allExceptQuantTrue) { | public static Map calculateProductPrice(DispatchContext dctx, Map context) { boolean optimizeForLargeRuleSet = false; // UtilTimer utilTimer = new UtilTimer(); // utilTimer.timerString("Starting price calc", module); // utilTimer.setLog(false); GenericDelegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Map result = new HashMap(); Timestamp nowTimestamp = UtilDateTime.nowTimestamp(); GenericValue product = (GenericValue) context.get("product"); String productId = product.getString("productId"); String prodCatalogId = (String) context.get("prodCatalogId"); String webSiteId = (String) context.get("webSiteId"); String checkIncludeVat = (String) context.get("checkIncludeVat"); String findAllQuantityPricesStr = (String) context.get("findAllQuantityPrices"); boolean findAllQuantityPrices = "Y".equals(findAllQuantityPricesStr); String agreementId = (String) context.get("agreementId"); String productStoreId = (String) context.get("productStoreId"); String productStoreGroupId = (String) context.get("productStoreGroupId"); GenericValue productStore = null; try { // we have a productStoreId, if the corresponding ProductStore.primaryStoreGroupId is not empty, use that productStore = delegator.findByPrimaryKeyCache("ProductStore", UtilMisc.toMap("productStoreId", productStoreId)); } catch (GenericEntityException e) { String errMsg = "Error getting product store info from the database while calculating price" + e.toString(); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); } if (UtilValidate.isEmpty(productStoreGroupId)) { if (productStore != null) { try { if (UtilValidate.isNotEmpty(productStore.getString("primaryStoreGroupId"))) { productStoreGroupId = productStore.getString("primaryStoreGroupId"); } else { // no ProductStore.primaryStoreGroupId, try ProductStoreGroupMember List productStoreGroupMemberList = delegator.findByAndCache("ProductStoreGroupMember", UtilMisc.toMap("productStoreId", productStoreId), UtilMisc.toList("sequenceNum", "-fromDate")); productStoreGroupMemberList = EntityUtil.filterByDate(productStoreGroupMemberList, true); if (productStoreGroupMemberList.size() > 0) { GenericValue productStoreGroupMember = EntityUtil.getFirst(productStoreGroupMemberList); productStoreGroupId = productStoreGroupMember.getString("productStoreGroupId"); } } } catch (GenericEntityException e) { String errMsg = "Error getting product store info from the database while calculating price" + e.toString(); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); } } // still empty, default to _NA_ if (UtilValidate.isEmpty(productStoreGroupId)) { productStoreGroupId = "_NA_"; } } // if currencyUomId is null get from properties file, if nothing there assume USD (USD: American Dollar) for now String currencyUomId = (String) context.get("currencyUomId"); if (UtilValidate.isEmpty(currencyUomId)) { currencyUomId = UtilProperties.getPropertyValue("general", "currency.uom.id.default", "USD"); } // productPricePurposeId is null assume "PURCHASE", which is equivalent to what prices were before the purpose concept String productPricePurposeId = (String) context.get("productPricePurposeId"); if (UtilValidate.isEmpty(productPricePurposeId)) { productPricePurposeId = "PURCHASE"; } // termUomId, for things like recurring prices specifies the term (time/frequency measure for example) of the recurrence // if this is empty it will simply not be used to constrain the selection String termUomId = (String) context.get("termUomId"); // if this product is variant, find the virtual product and apply checks to it as well String virtualProductId = null; if ("Y".equals(product.getString("isVariant"))) { try { virtualProductId = ProductWorker.getVariantVirtualId(product); } catch (GenericEntityException e) { String errMsg = "Error getting virtual product id from the database while calculating price" + e.toString(); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); } } // get prices for virtual product if one is found; get all ProductPrice entities for this productId and currencyUomId List virtualProductPrices = null; if (virtualProductId != null) { try { virtualProductPrices = delegator.findByAndCache("ProductPrice", UtilMisc.toMap("productId", virtualProductId, "currencyUomId", currencyUomId, "productStoreGroupId", productStoreGroupId), UtilMisc.toList("-fromDate")); } catch (GenericEntityException e) { Debug.logError(e, "An error occurred while getting the product prices", module); } virtualProductPrices = EntityUtil.filterByDate(virtualProductPrices, true); } // NOTE: partyId CAN be null String partyId = (String) context.get("partyId"); if (UtilValidate.isEmpty(partyId) && context.get("userLogin") != null) { GenericValue userLogin = (GenericValue) context.get("userLogin"); partyId = userLogin.getString("partyId"); } // check for auto-userlogin for price rules if (UtilValidate.isEmpty(partyId) && context.get("autoUserLogin") != null) { GenericValue userLogin = (GenericValue) context.get("autoUserLogin"); partyId = userLogin.getString("partyId"); } Double quantityDbl = (Double) context.get("quantity"); if (quantityDbl == null) quantityDbl = new Double(1.0); double quantity = quantityDbl.doubleValue(); List productPriceEcList = FastList.newInstance(); productPriceEcList.add(new EntityExpr("productId", EntityOperator.EQUALS, productId)); // this funny statement is for backward compatibility purposes; the productPricePurposeId is a new pk field on the ProductPrice entity and in order databases may not be populated, until the pk is updated and such; this will ease the transition somewhat if ("PURCHASE".equals(productPricePurposeId)) { productPriceEcList.add(new EntityExpr( new EntityExpr("productPricePurposeId", EntityOperator.EQUALS, productPricePurposeId), EntityOperator.OR, new EntityExpr("productPricePurposeId", EntityOperator.EQUALS, null))); } else { productPriceEcList.add(new EntityExpr("productPricePurposeId", EntityOperator.EQUALS, productPricePurposeId)); } productPriceEcList.add(new EntityExpr("currencyUomId", EntityOperator.EQUALS, currencyUomId)); productPriceEcList.add(new EntityExpr("productStoreGroupId", EntityOperator.EQUALS, productStoreGroupId)); if (UtilValidate.isNotEmpty(termUomId)) { productPriceEcList.add(new EntityExpr("termUomId", EntityOperator.EQUALS, termUomId)); } EntityCondition productPriceEc = new EntityConditionList(productPriceEcList, EntityOperator.AND); // for prices, get all ProductPrice entities for this productId and currencyUomId List productPrices = null; try { productPrices = delegator.findByConditionCache("ProductPrice", productPriceEc, null, UtilMisc.toList("-fromDate")); } catch (GenericEntityException e) { Debug.logError(e, "An error occurred while getting the product prices", module); } productPrices = EntityUtil.filterByDate(productPrices, true); // ===== get the prices we need: list, default, average cost, promo, min, max ===== List listPrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "LIST_PRICE")); GenericValue listPriceValue = EntityUtil.getFirst(listPrices); if (listPrices != null && listPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one LIST_PRICE with the currencyUomId " + currencyUomId + " and productId " + productId + ", using the latest found with price: " + listPriceValue.getDouble("price"), module); } List defaultPrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "DEFAULT_PRICE")); GenericValue defaultPriceValue = EntityUtil.getFirst(defaultPrices); if (defaultPrices != null && defaultPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one DEFAULT_PRICE with the currencyUomId " + currencyUomId + " and productId " + productId + ", using the latest found with price: " + defaultPriceValue.getDouble("price"), module); } // If there is an agreement between the company and the client, and there is // a price for the product in it, it will override the default price of the // ProductPrice entity. if (UtilValidate.isNotEmpty(agreementId)) { try { List agreementPrices = delegator.findByAnd("AgreementItemAndProductAppl", UtilMisc.toMap("agreementId", agreementId, "productId", productId, "currencyUomId", currencyUomId)); GenericValue agreementPriceValue = EntityUtil.getFirst(agreementPrices); if (agreementPriceValue != null && agreementPriceValue.get("price") != null) { defaultPriceValue = agreementPriceValue; } } catch (GenericEntityException e) { String errMsg = "Error getting agreement info from the database while calculating price" + e.toString(); Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); } } List competitivePrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "COMPETITIVE_PRICE")); GenericValue competitivePriceValue = EntityUtil.getFirst(competitivePrices); if (competitivePrices != null && competitivePrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one COMPETITIVE_PRICE with the currencyUomId " + currencyUomId + " and productId " + productId + ", using the latest found with price: " + competitivePriceValue.getDouble("price"), module); } List averageCosts = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "AVERAGE_COST")); GenericValue averageCostValue = EntityUtil.getFirst(averageCosts); if (averageCosts != null && averageCosts.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one AVERAGE_COST with the currencyUomId " + currencyUomId + " and productId " + productId + ", using the latest found with price: " + averageCostValue.getDouble("price"), module); } List promoPrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "PROMO_PRICE")); GenericValue promoPriceValue = EntityUtil.getFirst(promoPrices); if (promoPrices != null && promoPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one PROMO_PRICE with the currencyUomId " + currencyUomId + " and productId " + productId + ", using the latest found with price: " + promoPriceValue.getDouble("price"), module); } List minimumPrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "MINIMUM_PRICE")); GenericValue minimumPriceValue = EntityUtil.getFirst(minimumPrices); if (minimumPrices != null && minimumPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one MINIMUM_PRICE with the currencyUomId " + currencyUomId + " and productId " + productId + ", using the latest found with price: " + minimumPriceValue.getDouble("price"), module); } List maximumPrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "MAXIMUM_PRICE")); GenericValue maximumPriceValue = EntityUtil.getFirst(maximumPrices); if (maximumPrices != null && maximumPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one MAXIMUM_PRICE with the currencyUomId " + currencyUomId + " and productId " + productId + ", using the latest found with price: " + maximumPriceValue.getDouble("price"), module); } List wholesalePrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "WHOLESALE_PRICE")); GenericValue wholesalePriceValue = EntityUtil.getFirst(wholesalePrices); if (wholesalePrices != null && wholesalePrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one WHOLESALE_PRICE with the currencyUomId " + currencyUomId + " and productId " + productId + ", using the latest found with price: " + wholesalePriceValue.getDouble("price"), module); } List specialPromoPrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "SPECIAL_PROMO_PRICE")); GenericValue specialPromoPriceValue = EntityUtil.getFirst(specialPromoPrices); if (specialPromoPrices != null && specialPromoPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one SPECIAL_PROMO_PRICE with the currencyUomId " + currencyUomId + " and productId " + productId + ", using the latest found with price: " + specialPromoPriceValue.getDouble("price"), module); } // if any of these prices is missing and this product is a variant, default to the corresponding price on the virtual product if (virtualProductPrices != null && virtualProductPrices.size() > 0) { if (listPriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "LIST_PRICE")); listPriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one LIST_PRICE with the currencyUomId " + currencyUomId + " and productId " + virtualProductId + ", using the latest found with price: " + listPriceValue.getDouble("price"), module); } } if (defaultPriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "DEFAULT_PRICE")); defaultPriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one DEFAULT_PRICE with the currencyUomId " + currencyUomId + " and productId " + virtualProductId + ", using the latest found with price: " + defaultPriceValue.getDouble("price"), module); } } if (averageCostValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "AVERAGE_COST")); averageCostValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one AVERAGE_COST with the currencyUomId " + currencyUomId + " and productId " + virtualProductId + ", using the latest found with price: " + averageCostValue.getDouble("price"), module); } } if (promoPriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "PROMO_PRICE")); promoPriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one PROMO_PRICE with the currencyUomId " + currencyUomId + " and productId " + virtualProductId + ", using the latest found with price: " + promoPriceValue.getDouble("price"), module); } } if (minimumPriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "MINIMUM_PRICE")); minimumPriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one MINIMUM_PRICE with the currencyUomId " + currencyUomId + " and productId " + virtualProductId + ", using the latest found with price: " + minimumPriceValue.getDouble("price"), module); } } if (maximumPriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "MAXIMUM_PRICE")); maximumPriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one MAXIMUM_PRICE with the currencyUomId " + currencyUomId + " and productId " + virtualProductId + ", using the latest found with price: " + maximumPriceValue.getDouble("price"), module); } } if (wholesalePriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "WHOLESALE_PRICE")); wholesalePriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one WHOLESALE_PRICE with the currencyUomId " + currencyUomId + " and productId " + virtualProductId + ", using the latest found with price: " + wholesalePriceValue.getDouble("price"), module); } } if (specialPromoPriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "SPECIAL_PROMO_PRICE")); specialPromoPriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one SPECIAL_PROMO_PRICE with the currencyUomId " + currencyUomId + " and productId " + virtualProductId + ", using the latest found with price: " + specialPromoPriceValue.getDouble("price"), module); } } } // now if this is a virtual product check each price type, if doesn't exist get from variant with lowest DEFAULT_PRICE if ("Y".equals(product.getString("isVirtual"))) { // only do this if there is no default price, consider the others optional for performance reasons if (defaultPriceValue == null) { // Debug.logInfo("Product isVirtual and there is no default price for ID " + productId + ", trying variant prices", module); //use the cache to find the variant with the lowest default price try { List variantAssocList = EntityUtil.filterByDate(delegator.findByAndCache("ProductAssoc", UtilMisc.toMap("productId", product.get("productId"), "productAssocTypeId", "PRODUCT_VARIANT"), UtilMisc.toList("-fromDate"))); Iterator variantAssocIter = variantAssocList.iterator(); double minDefaultPrice = Double.MAX_VALUE; List variantProductPrices = null; String variantProductId = null; while (variantAssocIter.hasNext()) { GenericValue variantAssoc = (GenericValue) variantAssocIter.next(); String curVariantProductId = variantAssoc.getString("productIdTo"); List curVariantPriceList = EntityUtil.filterByDate(delegator.findByAndCache("ProductPrice", UtilMisc.toMap("productId", curVariantProductId), UtilMisc.toList("-fromDate")), nowTimestamp); List tempDefaultPriceList = EntityUtil.filterByAnd(curVariantPriceList, UtilMisc.toMap("productPriceTypeId", "DEFAULT_PRICE")); GenericValue curDefaultPriceValue = EntityUtil.getFirst(tempDefaultPriceList); if (curDefaultPriceValue != null) { Double curDefaultPrice = curDefaultPriceValue.getDouble("price"); if (curDefaultPrice.doubleValue() < minDefaultPrice) { // check to see if the product is discontinued for sale before considering it the lowest price GenericValue curVariantProduct = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", curVariantProductId)); if (curVariantProduct != null) { Timestamp salesDiscontinuationDate = curVariantProduct.getTimestamp("salesDiscontinuationDate"); if (salesDiscontinuationDate == null || salesDiscontinuationDate.after(nowTimestamp)) { minDefaultPrice = curDefaultPrice.doubleValue(); variantProductPrices = curVariantPriceList; variantProductId = curVariantProductId; // Debug.logInfo("Found new lowest price " + minDefaultPrice + " for variant with ID " + variantProductId, module); } } } } } if (variantProductPrices != null) { // we have some other options, give 'em a go... if (listPriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "LIST_PRICE")); listPriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one LIST_PRICE with the currencyUomId " + currencyUomId + " and productId " + variantProductId + ", using the latest found with price: " + listPriceValue.getDouble("price"), module); } } if (defaultPriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "DEFAULT_PRICE")); defaultPriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one DEFAULT_PRICE with the currencyUomId " + currencyUomId + " and productId " + variantProductId + ", using the latest found with price: " + defaultPriceValue.getDouble("price"), module); } } if (competitivePriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "COMPETITIVE_PRICE")); competitivePriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one COMPETITIVE_PRICE with the currencyUomId " + currencyUomId + " and productId " + variantProductId + ", using the latest found with price: " + competitivePriceValue.getDouble("price"), module); } } if (averageCostValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "AVERAGE_COST")); averageCostValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one AVERAGE_COST with the currencyUomId " + currencyUomId + " and productId " + variantProductId + ", using the latest found with price: " + averageCostValue.getDouble("price"), module); } } if (promoPriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "PROMO_PRICE")); promoPriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one PROMO_PRICE with the currencyUomId " + currencyUomId + " and productId " + variantProductId + ", using the latest found with price: " + promoPriceValue.getDouble("price"), module); } } if (minimumPriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "MINIMUM_PRICE")); minimumPriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one MINIMUM_PRICE with the currencyUomId " + currencyUomId + " and productId " + variantProductId + ", using the latest found with price: " + minimumPriceValue.getDouble("price"), module); } } if (maximumPriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "MAXIMUM_PRICE")); maximumPriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one MAXIMUM_PRICE with the currencyUomId " + currencyUomId + " and productId " + variantProductId + ", using the latest found with price: " + maximumPriceValue.getDouble("price"), module); } } if (wholesalePriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "WHOLESALE_PRICE")); wholesalePriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one WHOLESALE_PRICE with the currencyUomId " + currencyUomId + " and productId " + variantProductId + ", using the latest found with price: " + wholesalePriceValue.getDouble("price"), module); } } if (specialPromoPriceValue == null) { List virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "SPECIAL_PROMO_PRICE")); specialPromoPriceValue = EntityUtil.getFirst(virtualTempPrices); if (virtualTempPrices != null && virtualTempPrices.size() > 1) { if (Debug.infoOn()) Debug.logInfo("There is more than one SPECIAL_PROMO_PRICE with the currencyUomId " + currencyUomId + " and productId " + variantProductId + ", using the latest found with price: " + wholesalePriceValue.getDouble("price"), module); } } } } catch (GenericEntityException e) { Debug.logError(e, "An error occurred while getting the product prices", module); } } } //boolean validPromoPriceFound = false; double promoPrice = 0; if (promoPriceValue != null && promoPriceValue.get("price") != null) { promoPrice = promoPriceValue.getDouble("price").doubleValue(); //validPromoPriceFound = true; } //boolean validWholesalePriceFound = false; double wholesalePrice = 0; if (wholesalePriceValue != null && wholesalePriceValue.get("price") != null) { wholesalePrice = wholesalePriceValue.getDouble("price").doubleValue(); //validWholesalePriceFound = true; } boolean validPriceFound = false; double defaultPrice = 0; if (defaultPriceValue != null && defaultPriceValue.get("price") != null) { defaultPrice = defaultPriceValue.getDouble("price").doubleValue(); validPriceFound = true; } Double listPriceDbl = listPriceValue != null ? listPriceValue.getDouble("price") : null; if (listPriceDbl == null) { // no list price, use defaultPrice for the final price // ========= ensure calculated price is not below minSalePrice or above maxSalePrice ========= Double maxSellPrice = maximumPriceValue != null ? maximumPriceValue.getDouble("price") : null; if (maxSellPrice != null && defaultPrice > maxSellPrice.doubleValue()) { defaultPrice = maxSellPrice.doubleValue(); } // min price second to override max price, safety net Double minSellPrice = minimumPriceValue != null ? minimumPriceValue.getDouble("price") : null; if (minSellPrice != null && defaultPrice < minSellPrice.doubleValue()) { defaultPrice = minSellPrice.doubleValue(); // since we have found a minimum price that has overriden a the defaultPrice, even if no valid one was found, we will consider it as if one had been... validPriceFound = true; } result.put("basePrice", new Double(defaultPrice)); result.put("price", new Double(defaultPrice)); result.put("defaultPrice", new Double(defaultPrice)); result.put("competitivePrice", competitivePriceValue != null ? competitivePriceValue.getDouble("price") : null); result.put("averageCost", averageCostValue != null ? averageCostValue.getDouble("price") : null); result.put("promoPrice", promoPriceValue != null ? promoPriceValue.getDouble("price") : null); result.put("specialPromoPrice", specialPromoPriceValue != null ? specialPromoPriceValue.getDouble("price") : null); result.put("validPriceFound", new Boolean(validPriceFound)); result.put("isSale", new Boolean(false)); result.put("orderItemPriceInfos", FastList.newInstance()); Map errorResult = addGeneralResults(result, competitivePriceValue, specialPromoPriceValue, productStore, checkIncludeVat, currencyUomId, productId, quantity, partyId, dispatcher); if (errorResult != null) return errorResult; } else { try { List allProductPriceRules = makeProducePriceRuleList(delegator, optimizeForLargeRuleSet, productId, virtualProductId, prodCatalogId, productStoreGroupId, webSiteId, partyId, currencyUomId); List quantityProductPriceRules = null; List nonQuantityProductPriceRules = null; if (findAllQuantityPrices) { // split into list with quantity conditions and list without, then iterate through each quantity cond one quantityProductPriceRules = FastList.newInstance(); nonQuantityProductPriceRules = FastList.newInstance(); Iterator productPriceRulesIter = allProductPriceRules.iterator(); while (productPriceRulesIter.hasNext()) { GenericValue productPriceRule = (GenericValue) productPriceRulesIter.next(); List productPriceCondList = delegator.findByAndCache("ProductPriceCond", UtilMisc.toMap("productPriceRuleId", productPriceRule.get("productPriceRuleId"))); boolean foundQuantityInputParam = false; Iterator productPriceCondIter = productPriceCondList.iterator(); while (productPriceCondIter.hasNext()) { GenericValue productPriceCond = (GenericValue) productPriceCondIter.next(); if ("PRIP_QUANTITY".equals(productPriceCond.getString("inputParamEnumId"))) { foundQuantityInputParam = true; break; } } if (foundQuantityInputParam) { quantityProductPriceRules.add(productPriceRule); } else { nonQuantityProductPriceRules.add(productPriceRule); } } } if (findAllQuantityPrices) { List allQuantityPrices = FastList.newInstance(); // if findAllQuantityPrices then iterate through quantityProductPriceRules // foreach create an entry in the out list and eval that rule and all nonQuantityProductPriceRules rather than a single rule Iterator quantityProductPriceRuleIter = quantityProductPriceRules.iterator(); while (quantityProductPriceRuleIter.hasNext()) { GenericValue quantityProductPriceRule = (GenericValue) quantityProductPriceRuleIter.next(); List ruleListToUse = FastList.newInstance(); ruleListToUse.add(quantityProductPriceRule); ruleListToUse.addAll(nonQuantityProductPriceRules); Map quantCalcResults = calcPriceResultFromRules(ruleListToUse, listPriceDbl.doubleValue(), defaultPrice, promoPrice, wholesalePrice, maximumPriceValue, minimumPriceValue, validPriceFound, averageCostValue, productId, virtualProductId, prodCatalogId, productStoreGroupId, webSiteId, partyId, null, currencyUomId, delegator, nowTimestamp); Map quantErrorResult = addGeneralResults(quantCalcResults, competitivePriceValue, specialPromoPriceValue, productStore, checkIncludeVat, currencyUomId, productId, quantity, partyId, dispatcher); if (quantErrorResult != null) return quantErrorResult; // also add the quantityProductPriceRule to the Map so it can be used for quantity break information quantCalcResults.put("quantityProductPriceRule", quantityProductPriceRule); allQuantityPrices.add(quantCalcResults); } result.put("allQuantityPrices", allQuantityPrices); // use a quantity 1 to get the main price, then fill in the quantity break prices Map calcResults = calcPriceResultFromRules(allProductPriceRules, listPriceDbl.doubleValue(), defaultPrice, promoPrice, wholesalePrice, maximumPriceValue, minimumPriceValue, validPriceFound, averageCostValue, productId, virtualProductId, prodCatalogId, productStoreGroupId, webSiteId, partyId, new Double(1.0), currencyUomId, delegator, nowTimestamp); result.putAll(calcResults); Map errorResult = addGeneralResults(result, competitivePriceValue, specialPromoPriceValue, productStore, checkIncludeVat, currencyUomId, productId, quantity, partyId, dispatcher); if (errorResult != null) return errorResult; } else { Map calcResults = calcPriceResultFromRules(allProductPriceRules, listPriceDbl.doubleValue(), defaultPrice, promoPrice, wholesalePrice, maximumPriceValue, minimumPriceValue, validPriceFound, averageCostValue, productId, virtualProductId, prodCatalogId, productStoreGroupId, webSiteId, partyId, new Double(quantity), currencyUomId, delegator, nowTimestamp); result.putAll(calcResults); Map errorResult = addGeneralResults(result, competitivePriceValue, specialPromoPriceValue, productStore, checkIncludeVat, currencyUomId, productId, quantity, partyId, dispatcher); if (errorResult != null) return errorResult; } } catch (GenericEntityException e) { Debug.logError(e, "Error getting rules from the database while calculating price", module); return ServiceUtil.returnError("Error getting rules from the database while calculating price: " + e.toString()); } } // utilTimer.timerString("Finished price calc [productId=" + productId + "]", module); return result; } | 22229 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/22229/9062f973b5054261fada6f2b2c3d910f1c937c72/PriceServices.java/clean/applications/product/src/org/ofbiz/product/price/PriceServices.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1635,
4604,
4133,
5147,
12,
5325,
1042,
302,
5900,
16,
1635,
819,
13,
288,
3639,
1250,
10979,
1290,
20020,
21474,
273,
629,
31,
3639,
368,
3564,
6777,
1709,
6777,
273,
394,
356... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
1635,
4604,
4133,
5147,
12,
5325,
1042,
302,
5900,
16,
1635,
819,
13,
288,
3639,
1250,
10979,
1290,
20020,
21474,
273,
629,
31,
3639,
368,
3564,
6777,
1709,
6777,
273,
394,
356... |
public JIFSDirectory(String name) { this(); label = name; | public JIFSDirectory() { entries = new HashMap<String, FSEntry>(); | public JIFSDirectory(String name) { this(); label = name; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/44e5505d095f94ca14d04baf2d34709714253640/JIFSDirectory.java/clean/fs/src/fs/org/jnode/fs/jifs/JIFSDirectory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
804,
45,
4931,
2853,
12,
780,
508,
13,
288,
377,
202,
2211,
5621,
3639,
1433,
273,
508,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
804,
45,
4931,
2853,
12,
780,
508,
13,
288,
377,
202,
2211,
5621,
3639,
1433,
273,
508,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
switch ( eDerivedStructuralFeatureID( featureID, baseClass ) ) { case ModelPackage.CHART_WITHOUT_AXES__DESCRIPTION : return basicSetDescription( null, msgs ); case ModelPackage.CHART_WITHOUT_AXES__BLOCK : return basicSetBlock( null, msgs ); case ModelPackage.CHART_WITHOUT_AXES__EXTENDED_PROPERTIES : return ( (InternalEList) getExtendedProperties( ) ).basicRemove( otherEnd, msgs ); case ModelPackage.CHART_WITHOUT_AXES__SAMPLE_DATA : return basicSetSampleData( null, msgs ); case ModelPackage.CHART_WITHOUT_AXES__STYLES : return ( (InternalEList) getStyles( ) ).basicRemove( otherEnd, msgs ); case ModelPackage.CHART_WITHOUT_AXES__INTERACTIVITY : return basicSetInteractivity( null, msgs ); case ModelPackage.CHART_WITHOUT_AXES__SERIES_DEFINITIONS : return ( (InternalEList) getSeriesDefinitions( ) ).basicRemove( otherEnd, msgs ); default : return eDynamicInverseRemove( otherEnd, featureID, baseClass, msgs ); } | case ModelPackage.CHART_WITHOUT_AXES__SERIES_DEFINITIONS : return ( (InternalEList) getSeriesDefinitions( ) ).basicRemove( otherEnd, msgs ); | public NotificationChain eInverseRemove( InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs ) { if ( featureID >= 0 ) { switch ( eDerivedStructuralFeatureID( featureID, baseClass ) ) { case ModelPackage.CHART_WITHOUT_AXES__DESCRIPTION : return basicSetDescription( null, msgs ); case ModelPackage.CHART_WITHOUT_AXES__BLOCK : return basicSetBlock( null, msgs ); case ModelPackage.CHART_WITHOUT_AXES__EXTENDED_PROPERTIES : return ( (InternalEList) getExtendedProperties( ) ).basicRemove( otherEnd, msgs ); case ModelPackage.CHART_WITHOUT_AXES__SAMPLE_DATA : return basicSetSampleData( null, msgs ); case ModelPackage.CHART_WITHOUT_AXES__STYLES : return ( (InternalEList) getStyles( ) ).basicRemove( otherEnd, msgs ); case ModelPackage.CHART_WITHOUT_AXES__INTERACTIVITY : return basicSetInteractivity( null, msgs ); case ModelPackage.CHART_WITHOUT_AXES__SERIES_DEFINITIONS : return ( (InternalEList) getSeriesDefinitions( ) ).basicRemove( otherEnd, msgs ); default : return eDynamicInverseRemove( otherEnd, featureID, baseClass, msgs ); } } return eBasicSetContainer( null, featureID, msgs ); } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/036e8c78765730b146e5854b9d6c397a296fed86/ChartWithoutAxesImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/impl/ChartWithoutAxesImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
27050,
425,
16376,
3288,
12,
3186,
8029,
1308,
1638,
16,
1082,
202,
474,
6966,
16,
1659,
23955,
16,
27050,
8733,
262,
202,
95,
202,
202,
430,
261,
6966,
1545,
374,
262,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
27050,
425,
16376,
3288,
12,
3186,
8029,
1308,
1638,
16,
1082,
202,
474,
6966,
16,
1659,
23955,
16,
27050,
8733,
262,
202,
95,
202,
202,
430,
261,
6966,
1545,
374,
262,
202,
2... |
this.inputStream = inputStream; | this.executor = executor; this.dataSource = dataSource; | public PmdRunnable(InputStream inputStream, String fileName, SourceType sourceType, boolean debugEnabled, String encoding, String rulesets, String excludeMarker) { this.inputStream = inputStream; this.fileName = fileName; this.debugEnabled = debugEnabled; this.encoding = encoding; this.rulesets = rulesets; setJavaVersion(sourceType); setExcludeMarker(excludeMarker); } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/dea96e3059cc752dee82c71f71c7634c01df7479/PMD.java/buggy/pmd/src/net/sourceforge/pmd/PMD.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
453,
1264,
20013,
12,
4348,
10010,
16,
514,
3968,
16,
4998,
559,
26695,
16,
7734,
1250,
1198,
1526,
16,
514,
2688,
16,
514,
2931,
2413,
16,
514,
4433,
7078,
13,
288,
5411,
333,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
453,
1264,
20013,
12,
4348,
10010,
16,
514,
3968,
16,
4998,
559,
26695,
16,
7734,
1250,
1198,
1526,
16,
514,
2688,
16,
514,
2931,
2413,
16,
514,
4433,
7078,
13,
288,
5411,
333,
18... |
/* temporary disable to get the build working | public static Test suite() { TestSuite suite = new TestSuite(); /* temporary disable to get the build working File dir = new File("xdocs"); File[] files = dir.listFiles(); for (int i = 0; i < files.length; i++) { File file = files[i]; String name = file.getName(); if (name.endsWith(".wiki")) { name = "target/test-classes/wiki/" + name.replaceAll(".wiki", "Test.groovy"); System.setProperty("test", name); suite.addTest(GroovyTestSuite.suite()); } } */ return suite; } | 6462 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6462/70516d3567a56df2fe61e7ef6e47cf357cbf2b80/RunWikiTest.java/clean/src/test/org/codehaus/groovy/wiki/RunWikiTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
7766,
11371,
1435,
288,
3639,
7766,
13587,
11371,
273,
394,
7766,
13587,
5621,
9079,
1387,
1577,
273,
394,
1387,
2932,
92,
8532,
8863,
3639,
1387,
8526,
1390,
273,
1577,
18,
1098... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
7766,
11371,
1435,
288,
3639,
7766,
13587,
11371,
273,
394,
7766,
13587,
5621,
9079,
1387,
1577,
273,
394,
1387,
2932,
92,
8532,
8863,
3639,
1387,
8526,
1390,
273,
1577,
18,
1098... | |
return ((TreeItem) item).getItems(); } | return ((TreeItem) item).getItems(); } | protected Item[] getItems(Item item) { return ((TreeItem) item).getItems(); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/d94e309c616b79ca7e205fa94a5f9687ffcbe4f8/TreeViewer.java/buggy/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
4342,
8526,
15515,
12,
1180,
761,
13,
288,
3639,
327,
14015,
2471,
1180,
13,
761,
2934,
588,
3126,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
4342,
8526,
15515,
12,
1180,
761,
13,
288,
3639,
327,
14015,
2471,
1180,
13,
761,
2934,
588,
3126,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
throw new RuntimeException( "IOException: Couldn't fetch " + seekFileName, e ); | throw new RuntimeException( "IOException: Couldn't fetch " + seekFileName + " from " + this.getNetDataSourceUtil().getHost(), e ); | protected Collection<LocalFile> doTask( FutureTask<Boolean> future, long expectedSize, String seekFileName, String outputFileName ) { Executors.newSingleThreadExecutor().execute( future ); try { File outputFile = new File( outputFileName ); waitForDownload( future, expectedSize, outputFile ); if ( future.get().booleanValue() ) { if ( log.isInfoEnabled() ) log.info( "Unpacking " + outputFile ); unPack( outputFile ); cleanUp( outputFile ); if ( outputFile.isDirectory() ) return listFiles( seekFileName, outputFile ); return listFiles( seekFileName, outputFile.getParentFile() ); } } catch ( ExecutionException e ) { throw new RuntimeException( "Couldn't fetch " + seekFileName, e ); } catch ( InterruptedException e ) { throw new RuntimeException( "Interrupted: Couldn't fetch " + seekFileName, e ); } catch ( IOException e ) { throw new RuntimeException( "IOException: Couldn't fetch " + seekFileName, e ); } throw new RuntimeException( "Couldn't fetch " + seekFileName ); } | 4335 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4335/ac7d732530e4e72c766c5b1f104f930b66eb4701/FtpArchiveFetcher.java/clean/gemma-core/src/main/java/ubic/gemma/loader/util/fetcher/FtpArchiveFetcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
2200,
32,
2042,
812,
34,
741,
2174,
12,
9108,
2174,
32,
5507,
34,
3563,
16,
1525,
2665,
1225,
16,
514,
6520,
4771,
16,
5411,
514,
876,
4771,
262,
288,
3639,
3889,
13595,
18,
2704,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
2200,
32,
2042,
812,
34,
741,
2174,
12,
9108,
2174,
32,
5507,
34,
3563,
16,
1525,
2665,
1225,
16,
514,
6520,
4771,
16,
5411,
514,
876,
4771,
262,
288,
3639,
3889,
13595,
18,
2704,... |
public boolean isXMLName(Context cx, Object name) | public boolean isXMLName(Context cx, Object nameObj) | public boolean isXMLName(Context cx, Object name) { // TODO: Check if qname.localName() matches NCName return true; } | 47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/b5245d48f0acc282a8eaa1da1ab577e1ec69af6d/XMLLibImpl.java/buggy/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLLibImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
4201,
461,
12,
1042,
9494,
16,
1033,
508,
2675,
13,
565,
288,
3639,
368,
2660,
30,
2073,
309,
12621,
18,
3729,
461,
1435,
1885,
423,
39,
461,
3639,
327,
638,
31,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1250,
353,
4201,
461,
12,
1042,
9494,
16,
1033,
508,
2675,
13,
565,
288,
3639,
368,
2660,
30,
2073,
309,
12621,
18,
3729,
461,
1435,
1885,
423,
39,
461,
3639,
327,
638,
31,
565,
... |
this.lblInterval.setEnabled(bEnableUI); this.iscInterval.setEnabled(bEnableUI); | this.lblType.setEnabled( bEnableUI ); this.cmbType.setEnabled( bEnableUI ); | private void populateLists() { SeriesGrouping grouping = getGrouping(); boolean bEnableUI = btnEnabled.getSelection(); // Populate the data type combo Object[] oArr = DataType.VALUES.toArray(); for (int iR = 0; iR < oArr.length; iR++) { cmbType.add(((DataType) oArr[iR]).getName()); } if (bEnableUI && grouping.getGroupType() != null) { cmbType.setText(getGrouping().getGroupType().getName()); } else { cmbType.select(0); } this.lblType.setEnabled(bEnableUI); this.cmbType.setEnabled(bEnableUI); this.lblInterval.setEnabled(bEnableUI); this.iscInterval.setEnabled(bEnableUI); // Populate grouping unit combo (applicable only if type is DateTime // Populate the data type combo Object[] oUnitArr = GroupingUnitType.VALUES.toArray(); for (int iR = 0; iR < oUnitArr.length; iR++) { cmbUnit.add(((GroupingUnitType) oUnitArr[iR]).getName()); } if (bEnableUI && grouping.getGroupType() != null && grouping.getGroupType() == DataType.DATE_TIME_LITERAL && grouping.getGroupingUnit() != null) { cmbUnit.setText(grouping.getGroupingUnit().getName()); } else { cmbUnit.select(0); } lblUnit.setEnabled(bEnableUI & cmbType.getText().equals(DataType.DATE_TIME_LITERAL.getName())); cmbUnit.setEnabled(bEnableUI & cmbType.getText().equals(DataType.DATE_TIME_LITERAL.getName())); // Populate grouping aggregate expression combo cmbAggregate.setItems(PluginSettings.instance().getRegisteredAggregateFunctions()); if (bEnableUI && grouping.getAggregateExpression() != null) { cmbAggregate.setText(grouping.getAggregateExpression()); } else { cmbAggregate.select(0); } lblAggregate.setEnabled(bEnableUI); cmbAggregate.setEnabled(bEnableUI); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/35e5ac52b1d08645abccb0fa32df6279923b4897/SeriesGroupingComposite.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/SeriesGroupingComposite.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
6490,
7432,
1435,
565,
288,
3639,
9225,
21014,
12116,
273,
11751,
310,
5621,
3639,
1250,
324,
8317,
5370,
273,
10638,
1526,
18,
588,
6233,
5621,
3639,
368,
22254,
326,
501,
618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
6490,
7432,
1435,
565,
288,
3639,
9225,
21014,
12116,
273,
11751,
310,
5621,
3639,
1250,
324,
8317,
5370,
273,
10638,
1526,
18,
588,
6233,
5621,
3639,
368,
22254,
326,
501,
618,
... |
public int selectMessage(int messageNumber) { int rowCount = messageTable.getRowCount(); if (rowCount > 0) { int numberToSet = messageNumber; if (messageNumber < 0) { numberToSet = 0; } else if (messageNumber >= rowCount) { numberToSet = rowCount - 1; } messageTable.setRowSelectionInterval(numberToSet, numberToSet); makeSelectionVisible(numberToSet); return numberToSet; } else { return -1; } } | 967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/538edc8a94ad8ef2062ef68f8ea643b251c1a947/FolderDisplayPanel.java/clean/src/net/suberic/pooka/gui/FolderDisplayPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
2027,
1079,
12,
474,
883,
1854,
13,
288,
565,
509,
14888,
273,
883,
1388,
18,
588,
26359,
5621,
1850,
309,
261,
492,
1380,
405,
374,
13,
288,
1377,
509,
1300,
25208,
273,
883... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
509,
2027,
1079,
12,
474,
883,
1854,
13,
288,
565,
509,
14888,
273,
883,
1388,
18,
588,
26359,
5621,
1850,
309,
261,
492,
1380,
405,
374,
13,
288,
1377,
509,
1300,
25208,
273,
883... | ||
public void dispose() { // TODO Auto-generated method stub } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/1663bf19893c50fb6c66f6e2fee4bc87c54134c3/FilteredItemsSelectionDialog.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
6459,
2251,
4150,
1435,
95,
1082,
202,
759,
6241,
4965,
17,
11168,
2039,
12847,
202,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
6459,
2251,
4150,
1435,
95,
1082,
202,
759,
6241,
4965,
17,
11168,
2039,
12847,
202,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | ||
return new String(_gp.getGPClusterIdentifier() + ":Milvan" + getCounter()); | return new String("Milvan" + getCounter()); | protected String makeMilvanID() { return new String(_gp.getGPClusterIdentifier() + ":Milvan" + getCounter()); } | 7171 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7171/5fd13d09ebd2b93ccea53ac1256781c297e3b109/AmmoTransport.java/clean/glm/src/org/cougaar/glm/packer/AmmoTransport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
514,
1221,
49,
330,
90,
304,
734,
1435,
288,
3639,
327,
394,
514,
24899,
6403,
18,
588,
9681,
3629,
3004,
1435,
397,
15604,
6398,
49,
330,
90,
304,
6,
397,
31107,
10663,
225,
289,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
4750,
514,
1221,
49,
330,
90,
304,
734,
1435,
288,
3639,
327,
394,
514,
24899,
6403,
18,
588,
9681,
3629,
3004,
1435,
397,
15604,
6398,
49,
330,
90,
304,
6,
397,
31107,
10663,
225,
289,... |
public org.quickfix.field.AllocText getAllocText() throws FieldNotFound { org.quickfix.field.AllocText value = new org.quickfix.field.AllocText(); | public quickfix.field.AllocText getAllocText() throws FieldNotFound { quickfix.field.AllocText value = new quickfix.field.AllocText(); | public org.quickfix.field.AllocText getAllocText() throws FieldNotFound { org.quickfix.field.AllocText value = new org.quickfix.field.AllocText(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/Allocation.java/clean/src/java/src/quickfix/fix43/Allocation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8763,
1528,
336,
8763,
1528,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8763,
1528,
460,
273,
394,
2358,
18,
19525,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
8763,
1528,
336,
8763,
1528,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
8763,
1528,
460,
273,
394,
2358,
18,
19525,
... |
return (Parameter) paramInclude.getParameter(name); | return paramInclude.getParameter(name); | public Parameter getParameter(String name) { ParameterIncludeImpl paramInclude = (ParameterIncludeImpl) this.getComponentProperty(PARAMETER_KEY); return (Parameter) paramInclude.getParameter(name); } | 49300 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49300/b6b3a1e7c436fbae471d373811a01838ae696f95/ServiceDescription.java/clean/modules/core/src/org/apache/axis2/description/ServiceDescription.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5498,
5575,
12,
780,
508,
13,
288,
3639,
5498,
8752,
2828,
579,
8752,
273,
7734,
261,
1662,
8752,
2828,
13,
333,
18,
588,
1841,
1396,
12,
9819,
67,
3297,
1769,
3639,
327,
579,
875... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
5498,
5575,
12,
780,
508,
13,
288,
3639,
5498,
8752,
2828,
579,
8752,
273,
7734,
261,
1662,
8752,
2828,
13,
333,
18,
588,
1841,
1396,
12,
9819,
67,
3297,
1769,
3639,
327,
579,
875... |
AST __t1404 = _t; | AST __t1405 = _t; | public final void formstate(AST _t) throws RecognitionException { AST formstate_AST_in = (_t == ASTNULL) ? null : (AST)_t; AST __t1393 = _t; AST tmp1075_AST_in = (AST)_t; match(_t,FORMAT); _t = _t.getFirstChild(); { _loop1395: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { form_item(_t); _t = _retTree; } else { break _loop1395; } } while (true); } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case HEADER: { AST __t1397 = _t; AST tmp1076_AST_in = (AST)_t; match(_t,HEADER); _t = _t.getFirstChild(); { int _cnt1399=0; _loop1399: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { display_item(_t); _t = _retTree; } else { if ( _cnt1399>=1 ) { break _loop1399; } else {throw new NoViableAltException(_t);} } _cnt1399++; } while (true); } _t = __t1397; _t = _t.getNextSibling(); break; } case BACKGROUND: { AST __t1400 = _t; AST tmp1077_AST_in = (AST)_t; match(_t,BACKGROUND); _t = _t.getFirstChild(); { int _cnt1402=0; _loop1402: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Form_item)) { display_item(_t); _t = _retTree; } else { if ( _cnt1402>=1 ) { break _loop1402; } else {throw new NoViableAltException(_t);} } _cnt1402++; } while (true); } _t = __t1400; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case EXCEPT: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case EXCEPT: { AST __t1404 = _t; AST tmp1078_AST_in = (AST)_t; match(_t,EXCEPT); _t = _t.getFirstChild(); { _loop1406: do { if (_t==null) _t=ASTNULL; if ((_t.getType()==Field_ref)) { field(_t); _t = _retTree; } else { break _loop1406; } } while (true); } _t = __t1404; _t = _t.getNextSibling(); break; } case EOF: case PERIOD: case WITH: { break; } default: { throw new NoViableAltException(_t); } } } { if (_t==null) _t=ASTNULL; switch ( _t.getType()) { case WITH: { framephrase(_t); _t = _retTree; break; } case EOF: case PERIOD: { break; } default: { throw new NoViableAltException(_t); } } } state_end(_t); _t = _retTree; _t = __t1393; _t = _t.getNextSibling(); _retTree = _t; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/865876f0e6319c071fef156818ff116c276cfdff/TreeParser03.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser03/TreeParser03.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
646,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
646,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
646,
2019,
12,
9053,
389,
88,
13,
1216,
9539,
288,
9506,
202,
9053,
646,
2019,
67,
9053,
67,
267,
273,
261,
67,
88,
422,
9183,
8560,
13,
692,
446,
294,
261,
9053,
... |
PageMeta pageMeta) { | PageMeta pageMeta, boolean showSource) { | public GroovyPagesTemplate(ServletContext context, HttpServletRequest request, HttpServletResponse response, PageMeta pageMeta) { this.request = request; this.response = response; this.context = context; this.showSource = showSource && request.getParameter("showSource") != null; this.pageMeta = pageMeta; } | 51826 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51826/da6b9ce9b51b70b11cd6ae85fc57bd3f66918add/GroovyPagesTemplateEngine.java/buggy/src/web/org/codehaus/groovy/grails/web/pages/GroovyPagesTemplateEngine.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
20841,
5716,
2283,
12,
4745,
1042,
819,
16,
4766,
282,
9984,
590,
16,
4766,
282,
12446,
766,
16,
4766,
282,
3460,
2781,
1363,
2781,
16,
1250,
2405,
1830,
13,
288,
5411,
333,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
20841,
5716,
2283,
12,
4745,
1042,
819,
16,
4766,
282,
9984,
590,
16,
4766,
282,
12446,
766,
16,
4766,
282,
3460,
2781,
1363,
2781,
16,
1250,
2405,
1830,
13,
288,
5411,
333,
18,
2... |
public void setLocalName(String localName) { | public void setLocalName(final String localName) { | public void setLocalName(String localName) { _localName = localName; _qName = null; } //-- setLocalName | 3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/34c708e3c0e8dd4b42534f5834f9a280e0c9968b/JTypeName.java/buggy/castor/trunk/src/main/java/org/exolab/javasource/JTypeName.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
27970,
461,
12,
6385,
514,
11927,
13,
288,
3639,
389,
3729,
461,
273,
11927,
31,
3639,
389,
85,
461,
273,
446,
31,
565,
289,
368,
413,
27970,
461,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
27970,
461,
12,
6385,
514,
11927,
13,
288,
3639,
389,
3729,
461,
273,
11927,
31,
3639,
389,
85,
461,
273,
446,
31,
565,
289,
368,
413,
27970,
461,
2,
-100,
-100,
-100,
-100,
... |
" <Table name=\"sales_fact_1997\"/>\n" + " <DimensionUsage name=\"Time\" source=\"Time\" foreignKey=\"time_id\"/>\n" + " <Dimension name=\"Alternative Promotion\" foreignKey=\"promotion_id\">\n" + " <Hierarchy hasAll=\"true\" primaryKey=\"promo_id\">\n" + " <InlineTable alias=\"alt_promotion\">\n" + " <ColumnDefs>\n" + " <ColumnDef name=\"promo_id\" type=\"Numeric\"/>\n" + " <ColumnDef name=\"promo_name\" type=\"String\"/>\n" + " </ColumnDefs>\n" + " <Rows>\n" + " <Row>\n" + " <Value column=\"promo_id\">0</Value>\n" + " </Row>\n" + " <Row>\n" + " <Value column=\"promo_id\">1</Value>\n" + " <Value column=\"promo_name\">Promo1</Value>\n" + " </Row>\n" + " </Rows>\n" + " </InlineTable>\n" + " <Level name=\"Alternative Promotion\" column=\"promo_id\" nameColumn=\"promo_name\" uniqueMembers=\"true\"/> \n" + " </Hierarchy>\n" + " </Dimension>\n" + " <Measure name=\"Unit Sales\" column=\"unit_sales\" aggregator=\"sum\"\n" + " formatString=\"Standard\" visible=\"false\"/>\n" + " <Measure name=\"Store Sales\" column=\"store_sales\" aggregator=\"sum\"\n" + " formatString=\"#,###.00\"/>\n" + "</Cube>"); | " <Table name=\"sales_fact_1997\"/>\n" + " <DimensionUsage name=\"Time\" source=\"Time\" foreignKey=\"time_id\"/>\n" + " <Dimension name=\"Alternative Promotion\" foreignKey=\"promotion_id\">\n" + " <Hierarchy hasAll=\"true\" primaryKey=\"promo_id\">\n" + " <InlineTable alias=\"alt_promotion\">\n" + " <ColumnDefs>\n" + " <ColumnDef name=\"promo_id\" type=\"Numeric\"/>\n" + " <ColumnDef name=\"promo_name\" type=\"String\"/>\n" + " </ColumnDefs>\n" + " <Rows>\n" + " <Row>\n" + " <Value column=\"promo_id\">0</Value>\n" + " </Row>\n" + " <Row>\n" + " <Value column=\"promo_id\">1</Value>\n" + " <Value column=\"promo_name\">Promo1</Value>\n" + " </Row>\n" + " </Rows>\n" + " </InlineTable>\n" + " <Level name=\"Alternative Promotion\" column=\"promo_id\" nameColumn=\"promo_name\" uniqueMembers=\"true\"/> \n" + " </Hierarchy>\n" + " </Dimension>\n" + " <Measure name=\"Unit Sales\" column=\"unit_sales\" aggregator=\"sum\"\n" + " formatString=\"Standard\" visible=\"false\"/>\n" + " <Measure name=\"Store Sales\" column=\"store_sales\" aggregator=\"sum\"\n" + " formatString=\"#,###.00\"/>\n" + "</Cube>", null, null, null); | public void testNullNameColumn() { Schema schema = getConnection().getSchema(); final String cubeName = "Sales_inline"; final Cube cube = schema.createCube( "<Cube name=\"" + cubeName + "\">\n" + " <Table name=\"sales_fact_1997\"/>\n" + " <DimensionUsage name=\"Time\" source=\"Time\" foreignKey=\"time_id\"/>\n" + " <Dimension name=\"Alternative Promotion\" foreignKey=\"promotion_id\">\n" + " <Hierarchy hasAll=\"true\" primaryKey=\"promo_id\">\n" + " <InlineTable alias=\"alt_promotion\">\n" + " <ColumnDefs>\n" + " <ColumnDef name=\"promo_id\" type=\"Numeric\"/>\n" + " <ColumnDef name=\"promo_name\" type=\"String\"/>\n" + " </ColumnDefs>\n" + " <Rows>\n" + " <Row>\n" + " <Value column=\"promo_id\">0</Value>\n" + " </Row>\n" + " <Row>\n" + " <Value column=\"promo_id\">1</Value>\n" + " <Value column=\"promo_name\">Promo1</Value>\n" + " </Row>\n" + " </Rows>\n" + " </InlineTable>\n" + " <Level name=\"Alternative Promotion\" column=\"promo_id\" nameColumn=\"promo_name\" uniqueMembers=\"true\"/> \n" + " </Hierarchy>\n" + " </Dimension>\n" + " <Measure name=\"Unit Sales\" column=\"unit_sales\" aggregator=\"sum\"\n" + " formatString=\"Standard\" visible=\"false\"/>\n" + " <Measure name=\"Store Sales\" column=\"store_sales\" aggregator=\"sum\"\n" + " formatString=\"#,###.00\"/>\n" + "</Cube>"); try { getTestContext().assertQueryReturns( fold( "select {[Alternative Promotion].[All Alternative Promotions].[#null], [Alternative Promotion].[All Alternative Promotions].[Promo1]} ON COLUMNS\n" + "from [" + cubeName + "] "), fold( "Axis #0:\n" + "{}\n" + "Axis #1:\n" + "{[Alternative Promotion].[All Alternative Promotions].[#null]}\n" + "{[Alternative Promotion].[All Alternative Promotions].[Promo1]}\n" + "Row #0: 195,448\n" + "Row #0: \n")); } finally { schema.removeCube(cubeName); } } | 51263 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51263/ec3d0fa7aa88f7d1982d4720de09cec2395b5462/CompatibilityTest.java/clean/testsrc/main/mondrian/test/CompatibilityTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2041,
461,
1494,
1435,
288,
377,
202,
3078,
1963,
273,
6742,
7675,
588,
3078,
5621,
3639,
727,
514,
18324,
461,
273,
315,
23729,
67,
10047,
14432,
3639,
727,
385,
4895,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
2041,
461,
1494,
1435,
288,
377,
202,
3078,
1963,
273,
6742,
7675,
588,
3078,
5621,
3639,
727,
514,
18324,
461,
273,
315,
23729,
67,
10047,
14432,
3639,
727,
385,
4895,
1... |
patchString = patarray[i].getPatchHeader(); | patchString = patarray[i].getPatchHeader(); | public Patch[] dissect() { Device dev; Driver drv; int looplength; Patch[] patarray = null; StringBuffer patchString = this.getPatchHeader(); for (int k = 0; k < PatchEdit.appConfig.deviceCount(); k++) { // Do it for all converters. They should be at the // beginning of the driver list! dev = (Device)PatchEdit.appConfig.getDevice(k); for (int j = 0; j < dev.driverList.size(); j++) { if (!(dev.driverList.get(j) instanceof Converter)) continue; if (!((Driver) (dev.driverList.get(j))).supportsPatch(patchString, this)) { // Try, until one converter was successfull continue; } patarray = ((Converter) (dev.driverList.get(j))).extractPatch(this); if (patarray != null) { break; } } } // k++; if (patarray != null) { // Conversion was sucessfull, we have at least one converted patch looplength = patarray.length; // assign the original deviceNum and individual driverNum // to each patch of patarray for (int i = 0; i < looplength; i++) { patarray[i].deviceNum = this.deviceNum; dev = (Device) PatchEdit.appConfig.getDevice(patarray[i].deviceNum); patchString = patarray[i].getPatchHeader(); for (int j = 0; j < dev.driverList.size(); j++) { if (((Driver) dev.driverList.get(j)).supportsPatch(patchString, patarray[i])) patarray[i].driverNum = j; } } } else { // No conversion. Try just the original patch.... looplength = 1; patarray = new Patch[1]; patarray[0] = this; } return patarray; } | 7591 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7591/497be036ae1a86e2d69f94781ff3f4c8bc65f3c7/Patch.java/clean/JSynthLib/core/Patch.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12042,
8526,
1015,
5709,
1435,
288,
3639,
6077,
4461,
31,
3639,
9396,
302,
4962,
31,
3639,
509,
437,
83,
412,
1288,
31,
3639,
12042,
8526,
9670,
1126,
273,
446,
31,
3639,
6674,
4729... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12042,
8526,
1015,
5709,
1435,
288,
3639,
6077,
4461,
31,
3639,
9396,
302,
4962,
31,
3639,
509,
437,
83,
412,
1288,
31,
3639,
12042,
8526,
9670,
1126,
273,
446,
31,
3639,
6674,
4729... |
child.setAttribute(NAME_ATTRIBUTE_NAME, ((ModuleLink)containerElement).getName()); | public void writeExternal(Element element) throws WriteExternalException { for (final ContainerElement containerElement : myContents) { final Element child = new Element(CONTAINER_ELEMENT_NAME); if (containerElement instanceof ModuleLink) { child.setAttribute(TYPE_ATTRIBUTE_NAME, MODULE_TYPE); child.setAttribute(NAME_ATTRIBUTE_NAME, ((ModuleLink)containerElement).getName()); } else if (containerElement instanceof LibraryLink) { child.setAttribute(TYPE_ATTRIBUTE_NAME, LIBRARY_TYPE); LibraryLink libraryLink = (LibraryLink)containerElement; String level = libraryLink.getLevel(); child.setAttribute(LEVEL_ATTRIBUTE_NAME, level); } else { throw new WriteExternalException("invalid type: " + child); } containerElement.writeExternal(child); element.addContent(child); } } | 56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/307eb4f74fceaff106c79979d37cc5f3cce39b44/ModuleContainerImpl.java/clean/J2EE/source/com/intellij/j2ee/module/ModuleContainerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1045,
6841,
12,
1046,
930,
13,
1216,
2598,
6841,
503,
288,
565,
364,
261,
6385,
4039,
1046,
1478,
1046,
294,
3399,
6323,
13,
288,
1377,
727,
3010,
1151,
273,
394,
3010,
12,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1045,
6841,
12,
1046,
930,
13,
1216,
2598,
6841,
503,
288,
565,
364,
261,
6385,
4039,
1046,
1478,
1046,
294,
3399,
6323,
13,
288,
1377,
727,
3010,
1151,
273,
394,
3010,
12,
2... | |
return RubyString.newString(runtime, "#<" + getMetaClass().getName() + ">"); | return getRuntime().newString("#<" + getMetaClass().getName() + ">"); | public RubyString to_s() { return RubyString.newString(runtime, "#<" + getMetaClass().getName() + ">"); } | 47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyStruct.java/clean/src/org/jruby/RubyStruct.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
358,
67,
87,
1435,
288,
3639,
327,
18814,
7675,
2704,
780,
2932,
7,
32,
6,
397,
11312,
797,
7675,
17994,
1435,
397,
14675,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
780,
358,
67,
87,
1435,
288,
3639,
327,
18814,
7675,
2704,
780,
2932,
7,
32,
6,
397,
11312,
797,
7675,
17994,
1435,
397,
14675,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-... |
if (m_type != null) { return m_type; } else { return C.fromType(m_ssn.getProtoSession().getObjectType(this)); } | return m_oid.getObjectType(); | public ObjectType getObjectType() { if (m_type != null) { return m_type; } else { return C.fromType(m_ssn.getProtoSession().getObjectType(this)); } } | 12196 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12196/c5c4ea3fa9d3f0a1893c82d09b99bf665d0be179/DataObjectImpl.java/buggy/archive/proto/src/com/arsdigita/persistence/DataObjectImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
21338,
6455,
559,
1435,
288,
3639,
309,
261,
81,
67,
723,
480,
446,
13,
288,
5411,
327,
312,
67,
723,
31,
3639,
289,
469,
288,
5411,
327,
385,
18,
2080,
559,
12,
81,
67,
1049,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
21338,
6455,
559,
1435,
288,
3639,
309,
261,
81,
67,
723,
480,
446,
13,
288,
5411,
327,
312,
67,
723,
31,
3639,
289,
469,
288,
5411,
327,
385,
18,
2080,
559,
12,
81,
67,
1049,
... |
String message = standardMessage; int newValidationStatus = IMessageProvider.NONE; | String message = standardMessage; int newValidationStatus = IMessageProvider.NONE; | private boolean validateVariableValue() { // if the current validationStatus is ERROR, no additional validation applies if (validationStatus == IMessageProvider.ERROR) return false; // assumes everything will be ok String message = standardMessage; int newValidationStatus = IMessageProvider.NONE; if (variableValue.length() == 0) { // the variable value is empty message = WorkbenchMessages.getString("PathVariableDialog.variableValueEmptyMessage"); //$NON-NLS-1$ newValidationStatus = IMessageProvider.ERROR; } else if (!Path.EMPTY.isValidPath(variableValue)) { // the variable value is an invalid path message = WorkbenchMessages.getString("PathVariableDialog.variableValueInvalidMessage"); //$NON-NLS-1$ newValidationStatus = IMessageProvider.ERROR; } else if (!new File(variableValue).exists()) { // the path does not exist (warning) message = WorkbenchMessages.getString("PathVariableDialog.pathDoesNotExistMessage"); //$NON-NLS-1$ newValidationStatus = IMessageProvider.WARNING; } // overwrite the current validation status / message only if everything is ok (clearing them) // or if we have a more serious problem than the current one if (validationStatus == IMessageProvider.NONE || newValidationStatus > validationStatus) { validationStatus = newValidationStatus; setMessage(message, validationStatus); } // only ERRORs are not acceptable return validationStatus != IMessageProvider.ERROR;} | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/7431ebde622634df87fe3410214fc67a62c4f81e/PathVariableDialog.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PathVariableDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
1250,
1954,
3092,
620,
1435,
288,
565,
368,
309,
326,
783,
3379,
1482,
353,
5475,
16,
1158,
3312,
3379,
10294,
565,
309,
261,
8685,
1482,
422,
467,
1079,
2249,
18,
3589,
13,
3639,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
1250,
1954,
3092,
620,
1435,
288,
565,
368,
309,
326,
783,
3379,
1482,
353,
5475,
16,
1158,
3312,
3379,
10294,
565,
309,
261,
8685,
1482,
422,
467,
1079,
2249,
18,
3589,
13,
3639,
327,
... |
deployer.deployType( typeLib.getRole(), typeLib.getName(), file ); | typeDeployer.deployType( typeLib.getRole(), typeLib.getName() ); | private void deployTypeLib( final Deployer deployer, final Project project ) throws TaskException { final TypeLib[] typeLibs = project.getTypeLibs(); for( int i = 0; i < typeLibs.length; i++ ) { final TypeLib typeLib = typeLibs[ i ]; final File file = findTypeLib( typeLib.getLibrary() ); try { if( null == typeLib.getRole() ) { deployer.deploy( file ); } else { deployer.deployType( typeLib.getRole(), typeLib.getName(), file ); } } catch( final DeploymentException de ) { final String message = REZ.getString( "no-deploy.error", typeLib, file ); throw new TaskException( message, de ); } } } | 17033 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17033/0fec0f3137ece3e3543aa645162fb1b925d26a61/DefaultWorkspace.java/clean/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
7286,
559,
5664,
12,
727,
7406,
264,
7286,
264,
16,
727,
5420,
1984,
262,
3639,
1216,
3837,
503,
565,
288,
3639,
727,
1412,
5664,
8526,
618,
5664,
87,
273,
1984,
18,
588,
559... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
7286,
559,
5664,
12,
727,
7406,
264,
7286,
264,
16,
727,
5420,
1984,
262,
3639,
1216,
3837,
503,
565,
288,
3639,
727,
1412,
5664,
8526,
618,
5664,
87,
273,
1984,
18,
588,
559... |
region r1 =region.factory.region(0,4); region r2 =region.factory.region(5,9); region r3 =region.factory.region(0,9); place p = Runtime.here(); dist d1 = dist.factory.constant(r1, p); dist d2 = dist.factory.constant(r2, p); dist d3 = dist.factory.constant(r3, p); dist d4 = new Distribution_c.Combined(r3, new Distribution_c[] {(Distribution_c) d1, (Distribution_c)d2}); System.out.println("d1=" + d1); System.out.println("d2=" + d2); System.out.println("d3=" + d3); System.out.println("d4=" + d4); assertTrue(d4.equals(d3)); | Runtime.runAsync(new Activity() { public void run() { region r1 =region.factory.region(0,4); region r2 =region.factory.region(5,9); region r3 =region.factory.region(0,9); place p = Runtime.here(); dist d1 = dist.factory.constant(r1, p); dist d2 = dist.factory.constant(r2, p); dist d3 = dist.factory.constant(r3, p); dist d4 = new Distribution_c.Combined(r3, new Distribution_c[] {(Distribution_c) d1, (Distribution_c)d2}); System.out.println("d1=" + d1); System.out.println("d2=" + d2); System.out.println("d3=" + d3); System.out.println("d4=" + d4); assertTrue(d4.equals(d3)); } }); | public void testDistribution_subDistribution() { region r1 =region.factory.region(0,4); region r2 =region.factory.region(5,9); region r3 =region.factory.region(0,9); place p = Runtime.here(); dist d1 = dist.factory.constant(r1, p); dist d2 = dist.factory.constant(r2, p); dist d3 = dist.factory.constant(r3, p); dist d4 = new Distribution_c.Combined(r3, new Distribution_c[] {(Distribution_c) d1, (Distribution_c)d2}); System.out.println("d1=" + d1); System.out.println("d2=" + d2); System.out.println("d3=" + d3); System.out.println("d4=" + d4); assertTrue(d4.equals(d3)); // E_common=Distribution_c.Constant<region=|{[0],[1],[2],[3],[4]}|, place=|place(id=1)|> // E_notCommon=Distribution_c.Constant<region=|{[5],[6],[7],[8],[9]}|, place=|place(id=1)|> // E=Distribution_c.Constant<region=|0:9|, place=|place(id=1)|> // union=CombinedDistribution_c<Distribution_c.Constant<region=|{[0],[1],[2],[3],[4]}|, place=|place(id=1)|>Distribution_c.Constant<region=|{[5],[6],[7],[8],[9]}|, place=|place(id=1)| } | 1769 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1769/c3e57afd932557d200729ee46392d2da5fe6f43a/TestDistribution_c.java/clean/x10.test/src/x10/array/sharedmemory/TestDistribution_c.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
9003,
67,
1717,
9003,
1435,
288,
3639,
3020,
436,
21,
273,
6858,
18,
6848,
18,
6858,
12,
20,
16,
24,
1769,
3639,
3020,
436,
22,
273,
6858,
18,
6848,
18,
6858,
12,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
9003,
67,
1717,
9003,
1435,
288,
3639,
3020,
436,
21,
273,
6858,
18,
6848,
18,
6858,
12,
20,
16,
24,
1769,
3639,
3020,
436,
22,
273,
6858,
18,
6848,
18,
6858,
12,
25,... |
if ( ref == null && ref.size() > 0 ) | if ( ref == null || ref.size() > 0 ) | public Object next() { Object next = prefetched; SearchResult result = null; // if we're done we got nothing to give back if ( done ) { throw new NoSuchElementException(); } // if respDone has been assembled this is our last object to return if ( respDone != null ) { done = true; return respDone; } /* * If we have gotten this far then we have a valid next entry * or referral to return from this call in the 'next' variable. */ try { /* * If we have more results from the underlying cursorr then * we just set the result and build the response object below. */ if ( underlying.hasMore() ) { result = ( SearchResult ) underlying.next(); } else { try { underlying.close(); } catch( Throwable t ) {} respDone = new SearchResponseDoneImpl( req.getMessageId() ); respDone.setLdapResult( new LdapResultImpl( respDone ) ); respDone.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS ); respDone.getLdapResult().setMatchedDn( req.getBase() ); prefetched = null; return next; } } catch ( NamingException e ) { try { underlying.close(); } catch( Throwable t ) {} prefetched = null; respDone = getResponse( req, e ); return next; } /* * Now we have to build the prefetched object from the 'result' * local variable for the following call to next() */ Attribute ref = result.getAttributes().get( "ref" ); if ( ref == null && ref.size() > 0 ) { SearchResponseEntry respEntry = new SearchResponseEntryImpl( req.getMessageId() ); respEntry.setAttributes( result.getAttributes() ); respEntry.setObjectName( result.getName() ); prefetched = respEntry; } else { SearchResponseReference respRef = new SearchResponseReferenceImpl( req.getMessageId() ); respRef.setReferral( new ReferralImpl( respRef ) ); for ( int ii = 0; ii < ref.size(); ii++ ) { String url; try { url = ( String ) ref.get( ii ); respRef.getReferral().addLdapUrl( url ); } catch ( NamingException e ) { try { underlying.close(); } catch( Throwable t ) {} prefetched = null; respDone = getResponse( req, e ); return next; } } prefetched = respRef; } return next; } | 10677 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10677/5ae7407587e83907a93c46f9106eeba98024c476/SearchHandler.java/clean/protocol/src/java/org/apache/eve/protocol/SearchHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
1033,
1024,
1435,
3639,
288,
5411,
1033,
1024,
273,
17607,
329,
31,
5411,
29740,
563,
273,
446,
31,
5411,
368,
309,
732,
4565,
2731,
732,
2363,
5083,
358,
8492,
1473,
5411,
309,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
1033,
1024,
1435,
3639,
288,
5411,
1033,
1024,
273,
17607,
329,
31,
5411,
29740,
563,
273,
446,
31,
5411,
368,
309,
732,
4565,
2731,
732,
2363,
5083,
358,
8492,
1473,
5411,
309,
261... |
reportFatalError("OpenQuoteExpected", new Object[]{atName}); | reportFatalError("OpenQuoteExpected", new Object[]{eleName,atName}); | protected void scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, XMLAttributes attributes, int attrIndex, boolean checkEntities,String eleName) throws IOException, XNIException { // quote int quote = fEntityScanner.peekChar(); if (quote != '\'' && quote != '"') { reportFatalError("OpenQuoteExpected", new Object[]{atName}); } fEntityScanner.scanChar(); int entityDepth = fEntityDepth; int c = fEntityScanner.scanLiteral(quote, value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** scanLiteral -> \"" + value.toString() + "\""); } fStringBuffer2.clear(); fStringBuffer2.append(value); normalizeWhitespace(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** normalizeWhitespace -> \"" + value.toString() + "\""); } if (c != quote) { fScanningAttribute = true; fStringBuffer.clear(); do { fStringBuffer.append(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value2: \"" + fStringBuffer.toString() + "\""); } if (c == '&') { fEntityScanner.skipChar('&'); if (entityDepth == fEntityDepth) { fStringBuffer2.append('&'); } if (fEntityScanner.skipChar('#')) { if (entityDepth == fEntityDepth) { fStringBuffer2.append('#'); } int ch = scanCharReferenceValue(fStringBuffer, fStringBuffer2); if (ch != -1) { if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value3: \"" + fStringBuffer.toString() + "\""); } } } else { String entityName = fEntityScanner.scanName(); if (entityName == null) { reportFatalError("NameRequiredInReference", null); } else if (entityDepth == fEntityDepth) { fStringBuffer2.append(entityName); } if (!fEntityScanner.skipChar(';')) { reportFatalError("SemicolonRequiredInReference", new Object []{entityName}); } else if (entityDepth == fEntityDepth) { fStringBuffer2.append(';'); } if (entityName == fAmpSymbol) { fStringBuffer.append('&'); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value5: \"" + fStringBuffer.toString() + "\""); } } else if (entityName == fAposSymbol) { fStringBuffer.append('\''); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value7: \"" + fStringBuffer.toString() + "\""); } } else if (entityName == fLtSymbol) { fStringBuffer.append('<'); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value9: \"" + fStringBuffer.toString() + "\""); } } else if (entityName == fGtSymbol) { fStringBuffer.append('>'); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueB: \"" + fStringBuffer.toString() + "\""); } } else if (entityName == fQuotSymbol) { fStringBuffer.append('"'); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueD: \"" + fStringBuffer.toString() + "\""); } } else { if (fEntityManager.isExternalEntity(entityName)) { reportFatalError("ReferenceToExternalEntity", new Object[] { entityName }); } else { if (!fEntityManager.isDeclaredEntity(entityName)) { //WFC & VC: Entity Declared if (checkEntities) { if (fValidation) { fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, "EntityNotDeclared", new Object[]{entityName}, XMLErrorReporter.SEVERITY_ERROR); } } else { reportFatalError("EntityNotDeclared", new Object[]{entityName}); } } fEntityManager.startEntity(entityName, true); } } } } else if (c == '<') { reportFatalError("LessthanInAttValue", new Object[] { null, atName }); fEntityScanner.scanChar(); if (entityDepth == fEntityDepth) { fStringBuffer2.append((char)c); } } else if (c == '%' || c == ']') { fEntityScanner.scanChar(); fStringBuffer.append((char)c); if (entityDepth == fEntityDepth) { fStringBuffer2.append((char)c); } if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueF: \"" + fStringBuffer.toString() + "\""); } } else if (c == '\n' || c == '\r') { fEntityScanner.scanChar(); fStringBuffer.append(' '); if (entityDepth == fEntityDepth) { fStringBuffer2.append('\n'); } } else if (c != -1 && XMLChar.isHighSurrogate(c)) { if (scanSurrogates(fStringBuffer3)) { fStringBuffer.append(fStringBuffer3); if (entityDepth == fEntityDepth) { fStringBuffer2.append(fStringBuffer3); } if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueI: \"" + fStringBuffer.toString() + "\""); } } } else if (c != -1 && isInvalidLiteral(c)) { reportFatalError("InvalidCharInAttValue", new Object[] {eleName, atName, Integer.toString(c, 16)}); fEntityScanner.scanChar(); if (entityDepth == fEntityDepth) { fStringBuffer2.append((char)c); } } c = fEntityScanner.scanLiteral(quote, value); if (entityDepth == fEntityDepth) { fStringBuffer2.append(value); } normalizeWhitespace(value); } while (c != quote || entityDepth != fEntityDepth); fStringBuffer.append(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueN: \"" + fStringBuffer.toString() + "\""); } value.setValues(fStringBuffer); fScanningAttribute = false; } nonNormalizedValue.setValues(fStringBuffer2); // quote int cquote = fEntityScanner.scanChar(); if (cquote != quote) { reportFatalError("CloseQuoteExpected", new Object[]{atName}); } } // scanAttributeValue() | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/0f4d50691b68371e88d9a5812d98562f0e14b409/XMLScanner.java/buggy/src/org/apache/xerces/impl/XMLScanner.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4135,
14942,
12,
4201,
780,
460,
16,
4766,
4202,
3167,
780,
1661,
15577,
620,
16,
4766,
1377,
514,
622,
461,
16,
4766,
1377,
3167,
2498,
1677,
16,
509,
1604,
1016,
16,
4766,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
4135,
14942,
12,
4201,
780,
460,
16,
4766,
4202,
3167,
780,
1661,
15577,
620,
16,
4766,
1377,
514,
622,
461,
16,
4766,
1377,
3167,
2498,
1677,
16,
509,
1604,
1016,
16,
4766,
... |
private void parseMisc () | private void parseMisc() | private void parseMisc () throws Exception { while (true) { skipWhitespace (); if (tryRead (startDelimPI)) { parsePI (); } else if (tryRead (startDelimComment)) { parseComment (); } else { return; } } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/24330cfb4cc445da21a71a819ce54efe764fab6e/XmlParser.java/buggy/core/src/classpath/gnu/gnu/xml/aelfred2/XmlParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1109,
11729,
71,
1435,
565,
1216,
1185,
565,
288,
202,
17523,
261,
3767,
13,
288,
202,
565,
2488,
9431,
261,
1769,
202,
565,
309,
261,
698,
1994,
261,
1937,
21445,
1102,
3719,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1109,
11729,
71,
1435,
565,
1216,
1185,
565,
288,
202,
17523,
261,
3767,
13,
288,
202,
565,
2488,
9431,
261,
1769,
202,
565,
309,
261,
698,
1994,
261,
1937,
21445,
1102,
3719,
... |
grailsViewResolver.setProperty("prefix", SpringConfigUtils.createLiteralValue("/WEB-INF/grails-app/views")); | grailsViewResolver.setProperty("prefix", SpringConfigUtils.createLiteralValue("/WEB-INF/grails-app/views/")); | private void populateControllerReferences(Collection beanReferences, Map urlMappings) { Bean simpleGrailsController = SpringConfigUtils.createSingletonBean(SimpleGrailsController.class); simpleGrailsController.setAutowire("byType"); beanReferences.add(SpringConfigUtils.createBeanReference("simpleGrailsController", simpleGrailsController)); Bean grailsViewResolver = SpringConfigUtils.createSingletonBean(GrailsViewResolver.class); grailsViewResolver.setProperty("viewClass",SpringConfigUtils.createLiteralValue("org.springframework.web.servlet.view.JstlView")); grailsViewResolver.setProperty("prefix", SpringConfigUtils.createLiteralValue("/WEB-INF/grails-app/views")); grailsViewResolver.setProperty("suffix", SpringConfigUtils.createLiteralValue(".jsp")); beanReferences.add(SpringConfigUtils.createBeanReference("jspViewResolver", grailsViewResolver)); Bean simpleUrlHandlerMapping = null; if (application.getControllers().length > 0 || application.getPageFlows().length > 0) { simpleUrlHandlerMapping = SpringConfigUtils.createSingletonBean(GrailsUrlHandlerMapping.class); beanReferences.add(SpringConfigUtils.createBeanReference("handlerMapping", simpleUrlHandlerMapping)); } GrailsControllerClass[] simpleControllers = application.getControllers(); for (int i = 0; i < simpleControllers.length; i++) { GrailsControllerClass simpleController = simpleControllers[i]; if (!simpleController.getAvailable()) { continue; } Bean controllerClass = SpringConfigUtils.createSingletonBean(MethodInvokingFactoryBean.class); controllerClass.setProperty("targetObject", SpringConfigUtils.createBeanReference("grailsApplication")); controllerClass.setProperty("targetMethod", SpringConfigUtils.createLiteralValue("getController")); controllerClass.setProperty("arguments", SpringConfigUtils.createLiteralValue(simpleController.getFullName())); beanReferences.add(SpringConfigUtils.createBeanReference(simpleController.getFullName() + "Class", controllerClass)); controllerClassBeans.put(simpleController.getFullName() + "Class", controllerClass); Bean controller = SpringConfigUtils.createPrototypeBean(); controller.setFactoryBean(SpringConfigUtils.createBeanReference(simpleController.getFullName() + "Class")); controller.setFactoryMethod("newInstance"); controller.setAutowire("byName"); /*if (simpleController.byType()) { controller.setAutowire("byType"); } else if (simpleController.byName()) { controller.setAutowire("byName"); }*/ beanReferences.add(SpringConfigUtils.createBeanReference(simpleController.getFullName(), controller)); for (int x = 0; x < simpleController.getURIs().length; x++) { if(!urlMappings.containsKey(simpleController.getURIs()[x])) urlMappings.put(simpleController.getURIs()[x], "simpleGrailsController"); } } if (simpleUrlHandlerMapping != null) { simpleUrlHandlerMapping.setProperty("mappings", SpringConfigUtils.createProperties(urlMappings)); } GrailsTagLibClass[] tagLibs = application.getGrailsTabLibClasses(); for (int i = 0; i < tagLibs.length; i++) { GrailsTagLibClass grailsTagLib = tagLibs[i]; Bean taglibClass = SpringConfigUtils.createSingletonBean(MethodInvokingFactoryBean.class); taglibClass.setProperty("targetObject", SpringConfigUtils.createBeanReference("grailsApplication")); taglibClass.setProperty("targetMethod", SpringConfigUtils.createLiteralValue("getGrailsTagLibClass")); taglibClass.setProperty("arguments", SpringConfigUtils.createLiteralValue(grailsTagLib.getFullName())); beanReferences.add(SpringConfigUtils.createBeanReference(grailsTagLib.getFullName() + "Class", taglibClass)); controllerClassBeans.put(grailsTagLib.getFullName() + "Class", taglibClass); Bean taglib = SpringConfigUtils.createPrototypeBean(); taglib.setFactoryBean(SpringConfigUtils.createBeanReference(grailsTagLib.getFullName() + "Class")); taglib.setFactoryMethod("newInstance"); taglib.setAutowire("byName"); beanReferences.add(SpringConfigUtils.createBeanReference(grailsTagLib.getFullName(), taglib)); } } | 51763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51763/9319b2487e82433202c4b7e86c557193a7ad2ae3/SpringConfig.java/clean/src/commons/org/codehaus/groovy/grails/commons/spring/SpringConfig.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
6490,
2933,
8221,
12,
2532,
3931,
8221,
16,
1635,
880,
7742,
13,
288,
202,
202,
3381,
4143,
14571,
14573,
2933,
273,
22751,
809,
1989,
18,
2640,
19571,
3381,
12,
5784,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
6490,
2933,
8221,
12,
2532,
3931,
8221,
16,
1635,
880,
7742,
13,
288,
202,
202,
3381,
4143,
14571,
14573,
2933,
273,
22751,
809,
1989,
18,
2640,
19571,
3381,
12,
5784,
145... |
return new XmlFile(XSTREAM,new File(Hudson.getInstance().getRootDir(),"users/"+ id +"/config.xml")); | String safeId = id.replace('\\', '_').replace('/', '_'); return new XmlFile(XSTREAM,new File(Hudson.getInstance().getRootDir(),"users/"+ safeId +"/config.xml")); | protected final XmlFile getConfigFile() { return new XmlFile(XSTREAM,new File(Hudson.getInstance().getRootDir(),"users/"+ id +"/config.xml")); } | 30846 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/30846/63548ab9f1c7acb50e4f8b087a254a08573f3c6b/User.java/clean/core/src/main/java/hudson/model/User.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
727,
5714,
812,
4367,
812,
1435,
288,
3639,
514,
4183,
548,
273,
612,
18,
2079,
2668,
1695,
2187,
4427,
2934,
2079,
2668,
19,
2187,
4427,
1769,
327,
394,
5714,
812,
12,
60,
13693,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
727,
5714,
812,
4367,
812,
1435,
288,
3639,
514,
4183,
548,
273,
612,
18,
2079,
2668,
1695,
2187,
4427,
2934,
2079,
2668,
19,
2187,
4427,
1769,
327,
394,
5714,
812,
12,
60,
13693,
... |
protected String paramString() { return null; } | protected String paramString() { return "JMenuItem"; } | protected String paramString() { return null; // TODO } // paramString() | 45163 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45163/14511e3ad21013e92c6399b2bd2ec09a8263e33a/JMenuItem.java/buggy/libjava/javax/swing/JMenuItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
579,
780,
1435,
288,
202,
202,
2463,
446,
31,
368,
2660,
202,
97,
368,
579,
780,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
514,
579,
780,
1435,
288,
202,
202,
2463,
446,
31,
368,
2660,
202,
97,
368,
579,
780,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
public org.quickfix.field.LastRptRequested getLastRptRequested() throws FieldNotFound { org.quickfix.field.LastRptRequested value = new org.quickfix.field.LastRptRequested(); | public quickfix.field.LastRptRequested getLastRptRequested() throws FieldNotFound { quickfix.field.LastRptRequested value = new quickfix.field.LastRptRequested(); | public org.quickfix.field.LastRptRequested getLastRptRequested() throws FieldNotFound { org.quickfix.field.LastRptRequested value = new org.quickfix.field.LastRptRequested(); getField(value); return value; } | 5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/CollateralReport.java/buggy/src/java/src/quickfix/fix44/CollateralReport.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
3024,
54,
337,
11244,
7595,
54,
337,
11244,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
3024,
54,
337,
11244,
460,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
3024,
54,
337,
11244,
7595,
54,
337,
11244,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
3024,
54,
337,
11244,
460,
27... |
order = fs.getDimensionOrder(id); | order = fs.getDimensionOrder(id).substring(2); | public OptionsWindow(int numZ, int numT, CustomWindow c) { super("LOCI Data Browser - Options"); setBackground(Color.gray); cw = c; manager = cw.db.manager; FileStitcher fs = cw.db.fStitch; update = false; Border etchB = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED); // get FilePattern Data String id = null,order = null,suffix = null; String[] prefixes = null,blocks = null; int sizeZ = -1,sizeT = -1,sizeC = -1; int[] axes = null; FilePattern fp = null; try { id = cw.db.id; order = fs.getDimensionOrder(id); sizeZ = fs.getSizeZ(id); sizeT = fs.getSizeT(id); sizeC = fs.getSizeC(id); axes = fs.getAxisTypes(id); fp = fs.getFilePattern(id); prefixes = fp.getPrefixes(); blocks = fp.getBlocks(); suffix = fp.getSuffix(); } catch(Exception exc) {exc.printStackTrace();} // add Display Pane JPanel disPane = new JPanel(); TitledBorder disB = BorderFactory.createTitledBorder(etchB, "Custom Axes"); disPane.setBorder(disB); JLabel sliceLab = new JLabel("\u00B7" + "Slice-Groups in File" + "\u00B7"); JLabel zLab = new JLabel(sizeZ + " slice(s):"); JLabel tLab = new JLabel(sizeT + " slice(s):"); JLabel cLab = new JLabel(sizeC + " slice(s):"); JLabel blockLab = new JLabel("\u00B7" + "Blocks in Filenames" + "\u00B7"); JLabel fileLab = new JLabel("Filename:"); Vector blockLabelsV = new Vector(); for(int i = 0;i<blocks.length;i++) { JLabel temp = new JLabel("Block " + blocks[i] + ":"); blockLabelsV.add(temp); } Object[] blockLabelsO = blockLabelsV.toArray(); JLabel[] blockLabels = new JLabel[blockLabelsO.length]; for(int i = 0;i<blockLabelsO.length;i++) { blockLabels[i] = (JLabel) blockLabelsO[i]; } Object[] choices = {"Z-Depth", "Time", "Channel"}; JComboBox zGroup = new JComboBox(choices); JComboBox tGroup = new JComboBox(choices); tGroup.setSelectedIndex(1); JComboBox cGroup = new JComboBox(choices); cGroup.setSelectedIndex(2); zGroup.addActionListener(this); tGroup.addActionListener(this); cGroup.addActionListener(this); Vector blockBoxesV = new Vector(); for(int i = 0;i<blocks.length;i++) { JComboBox temp = new JComboBox(choices); if (axes[i] == AxisGuesser.Z_AXIS) temp.setSelectedIndex(0); else if (axes[i] == AxisGuesser.T_AXIS) temp.setSelectedIndex(1); else temp.setSelectedIndex(2); temp.setActionCommand("Block1"); temp.addActionListener(this); blockBoxesV.add(temp); } Object[] blockBoxesO = blockBoxesV.toArray(); JComboBox[] blockBoxes = new JComboBox[blockBoxesO.length]; for(int i = 0;i<blockBoxesO.length;i++) { JComboBox temp = (JComboBox) blockBoxesO[i]; temp.setForeground(getColor(i)); blockBoxes[i] = temp; } JPanel slicePanel = new JPanel(); slicePanel.add(sliceLab); slicePanel.setBackground(Color.darkGray); sliceLab.setForeground(Color.lightGray); JPanel blockPanel = new JPanel(); blockPanel.add(blockLab); blockPanel.setBackground(Color.darkGray); blockLab.setForeground(Color.lightGray); JPanel filePane = new JPanel(new FlowLayout()); for(int i = 0;i<prefixes.length;i++) { JLabel prefLab = new JLabel(prefixes[i]); JLabel blokLab = new JLabel(blocks[i]); blokLab.setForeground(getColor(i)); filePane.add(prefLab); filePane.add(blokLab); } JLabel sufLab = new JLabel(suffix); filePane.add(sufLab); String rowString = "pref," + TAB + ",pref,pref,pref," + TAB + ",pref,pref"; for(int i = 0; i<blockLabels.length;i++) { rowString += ",pref"; } FormLayout layout = new FormLayout( TAB + ",pref," + TAB + ",pref:grow," + TAB, rowString); disPane.setLayout(layout); CellConstraints cc = new CellConstraints(); disPane.add(slicePanel,cc.xyw(1,1,5)); disPane.add(zLab,cc.xy(2,3)); disPane.add(zGroup,cc.xy(4,3)); disPane.add(tLab,cc.xy(2,4)); disPane.add(tGroup,cc.xy(4,4)); disPane.add(cLab,cc.xy(2,5)); disPane.add(cGroup,cc.xy(4,5)); disPane.add(blockPanel,cc.xyw(1,7,5)); disPane.add(fileLab,cc.xy(2,8)); disPane.add(filePane,cc.xy(4,8)); for(int i = 0;i<blockLabels.length;i++) { disPane.add(blockLabels[i], cc.xy(2,9+i)); disPane.add(blockBoxes[i], cc.xy(4,9+i)); } //set up animation options pane JPanel aniPane = new JPanel(); TitledBorder aniB = BorderFactory.createTitledBorder( etchB, "Animation Options"); aniPane.setBorder(aniB); JLabel fpsLab = new JLabel("Frames per second:"); SpinnerNumberModel model = new SpinnerNumberModel(10, 1, 99, 1); fps = new JSpinner(model); fps.addChangeListener(this); FormLayout layout2 = new FormLayout( TAB + ",pref," + TAB + ",pref:grow," + TAB, "pref"); aniPane.setLayout(layout2); CellConstraints cc2 = new CellConstraints(); aniPane.add(fpsLab,cc2.xy(2,1)); aniPane.add(fps,cc2.xy(4,1)); JPanel cachePane = new JPanel(); TitledBorder cacheB = BorderFactory.createTitledBorder( etchB, "CacheManager Options"); cachePane.setBorder(cacheB); JLabel typeL = new JLabel("\u00B7" + "Cache Type" + "\u00B7"); JLabel axesL = new JLabel("Axes to Cache:"); JLabel modeL = new JLabel("Cache Mode:"); JLabel stratL = new JLabel("Loading Strategy:"); JLabel sizeL = new JLabel("\u00B7" + "Slices to Store" + "\u00B7"); JLabel forL = new JLabel("Forward"); JLabel backL = new JLabel("Backward"); JLabel zL = new JLabel("Z:"); JLabel tL = new JLabel("T:"); JLabel cL = new JLabel("C:"); JLabel priorL = new JLabel("\u00B7" + "Axis Priority" + "\u00B7"); JLabel topL = new JLabel("Top Priority:"); JLabel midL = new JLabel("Mid Priority:"); JLabel lowL = new JLabel("Low Priority:"); JPanel typePanel = new JPanel(); typePanel.add(typeL); typePanel.setBackground(Color.darkGray); typeL.setForeground(Color.lightGray); JPanel sizePanel = new JPanel(); sizePanel.add(sizeL); sizePanel.setBackground(Color.darkGray); sizeL.setForeground(Color.lightGray); JPanel priorPanel = new JPanel(); priorPanel.add(priorL); priorPanel.setBackground(Color.darkGray); priorL.setForeground(Color.lightGray); zCheck = new JCheckBox("Z"); tCheck = new JCheckBox("T"); tCheck.setSelected(true); cCheck = new JCheckBox("C"); JPanel checkPanel = new JPanel(new GridLayout(1,3)); checkPanel.add(zCheck); checkPanel.add(tCheck); checkPanel.add(cCheck); zCheck.addItemListener(this); tCheck.addItemListener(this); cCheck.addItemListener(this); String[] modes = {"Crosshair", "Rectangle", "Cross/Rect"}; modeBox = new JComboBox(modes); String[] strats = {"Forward","Surround"}; stratBox = new JComboBox(strats); String[] boxAxes = {"Z","T","C"}; topBox = new JComboBox(boxAxes); midBox = new JComboBox(boxAxes); lowBox = new JComboBox(boxAxes); topBox.setSelectedIndex(1); midBox.setSelectedIndex(0); lowBox.setSelectedIndex(2); modeBox.addActionListener(this); stratBox.addActionListener(this); topBox.addActionListener(this); midBox.addActionListener(this); lowBox.addActionListener(this); SpinnerNumberModel zFMod = new SpinnerNumberModel(0,0,9999,1); zFSpin = new JSpinner(zFMod); SpinnerNumberModel zBMod = new SpinnerNumberModel(0,0,9999,1); zBSpin = new JSpinner(zBMod); SpinnerNumberModel tFMod = new SpinnerNumberModel(20,0,9999,1); tFSpin = new JSpinner(tFMod); SpinnerNumberModel tBMod = new SpinnerNumberModel(0,0,9999,1); tBSpin = new JSpinner(tBMod); SpinnerNumberModel cFMod = new SpinnerNumberModel(0,0,9999,1); cFSpin = new JSpinner(cFMod); SpinnerNumberModel cBMod = new SpinnerNumberModel(0,0,9999,1); cBSpin = new JSpinner(cBMod); zFSpin.addChangeListener(this); zBSpin.addChangeListener(this); tFSpin.addChangeListener(this); tBSpin.addChangeListener(this); cFSpin.addChangeListener(this); cBSpin.addChangeListener(this); resetBtn = new JButton("Reset CacheManager to Default"); resetBtn.addActionListener(this); FormLayout layout3 = new FormLayout( TAB + ",pref," + TAB + ",pref:grow," + TAB + ",pref:grow," + TAB, "pref,pref,pref,pref," + TAB + ",pref,pref,pref,pref,pref," + TAB + ",pref," + TAB + ",pref,pref,pref," + TAB + ",pref"); cachePane.setLayout(layout3); CellConstraints cc3 = new CellConstraints(); cachePane.add(typePanel,cc3.xyw(1,1,7)); cachePane.add(axesL,cc3.xyw(2,2,3)); cachePane.add(checkPanel,cc3.xy(6,2)); cachePane.add(modeL,cc3.xyw(2,3,3)); cachePane.add(modeBox,cc3.xy(6,3)); cachePane.add(stratL,cc3.xyw(2,4,3)); cachePane.add(stratBox,cc3.xy(6,4)); cachePane.add(sizePanel,cc3.xyw(1,6,7)); cachePane.add(forL,cc3.xy(4,7)); cachePane.add(backL,cc3.xy(6,7)); cachePane.add(zL,cc3.xy(2,8)); cachePane.add(zFSpin,cc3.xy(4,8)); cachePane.add(zBSpin,cc3.xy(6,8)); cachePane.add(tL,cc3.xy(2,9)); cachePane.add(tFSpin,cc3.xy(4,9)); cachePane.add(tBSpin,cc3.xy(6,9)); cachePane.add(cL,cc3.xy(2,10)); cachePane.add(cFSpin,cc3.xy(4,10)); cachePane.add(cBSpin,cc3.xy(6,10)); cachePane.add(priorPanel,cc3.xyw(1,12,7)); cachePane.add(topL,cc3.xyw(2,14,3)); cachePane.add(topBox,cc3.xy(6,14)); cachePane.add(midL,cc3.xyw(2,15,3)); cachePane.add(midBox,cc3.xy(6,15)); cachePane.add(lowL,cc3.xyw(2,16,3)); cachePane.add(lowBox,cc3.xy(6,16)); cachePane.add(resetBtn,cc3.xyw(2,18,5,"right,center")); if(!cw.db.virtual) enableCache(false); //configure/layout content pane FormLayout lastLayout = new FormLayout( "pref:grow", "pref,pref,pref"); setLayout(lastLayout); CellConstraints ccs = new CellConstraints(); add(aniPane,ccs.xy(1,1)); add(cachePane,ccs.xy(1,2)); add(disPane,ccs.xy(1,3)); oldTop = topBox.getSelectedIndex(); oldMid = midBox.getSelectedIndex(); oldLow = lowBox.getSelectedIndex(); //useful frame method that handles closing of window setDefaultCloseOperation(HIDE_ON_CLOSE); //put frame in the right place, with the right size, and make visible setLocation(100, 100);// ((JComponent) getContentPane()).setPreferredSize(new Dimension(300,500)); pack(); setVisible(true); update = true; } | 55415 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55415/f9b1d673ac7096425b738aed5786e97061d67b50/OptionsWindow.java/clean/loci/plugins/browser/OptionsWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5087,
3829,
12,
474,
818,
62,
16,
509,
818,
56,
16,
6082,
3829,
276,
13,
288,
565,
2240,
2932,
1502,
7266,
1910,
15408,
300,
5087,
8863,
565,
31217,
12,
2957,
18,
22440,
1769,
565... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
5087,
3829,
12,
474,
818,
62,
16,
509,
818,
56,
16,
6082,
3829,
276,
13,
288,
565,
2240,
2932,
1502,
7266,
1910,
15408,
300,
5087,
8863,
565,
31217,
12,
2957,
18,
22440,
1769,
565... |
node.setAttribute(KEY_QUERY_STRING, query.getQueryUrl()); | node.setAttribute(KEY_QUERY_STRING, query.getUrl()); | public Element createQueryElement(AbstractRepositoryQuery query, Document doc, Element parent) { String queryTagName = getQueryTagNameForElement(query); Element node = doc.createElement(queryTagName); node.setAttribute(KEY_NAME, query.getDescription()); node.setAttribute(KEY_QUERY_MAX_HITS, query.getMaxHits() + ""); node.setAttribute(KEY_QUERY_STRING, query.getQueryUrl()); node.setAttribute(KEY_REPOSITORY_URL, query.getRepositoryUrl()); if (query instanceof JiraRepositoryQuery) { NamedFilter filter = ((JiraRepositoryQuery) query).getNamedFilter(); node.setAttribute(KEY_FILTER_ID, filter.getId()); node.setAttribute(KEY_FILTER_NAME, filter.getName()); node.setAttribute(KEY_FILTER_DESCRIPTION, filter.getDescription()); } else { FilterDefinition filter = ((JiraCustomQuery) query).getFilterDefinition(); node.setAttribute(KEY_FILTER_ID, filter.getName()); node.setAttribute(KEY_FILTER_NAME, filter.getName()); node.setAttribute(KEY_FILTER_DESCRIPTION, filter.getDescription()); // XXX implement actual export node.setAttribute(KEY_FILTER_CUSTOM, encodeFilter(filter)); } Set<AbstractQueryHit> hits = Collections.synchronizedSet(query.getHits()); synchronized (hits) { for (AbstractQueryHit hit : hits) { try { Element element = null; for (ITaskListExternalizer externalizer : super.getDelegateExternalizers()) { if (externalizer.canCreateElementFor(hit)) element = externalizer.createQueryHitElement(hit, doc, node); } if (element == null) createQueryHitElement(hit, doc, node); } catch (Exception e) { MylarStatusHandler.log(e, e.getMessage()); } } } parent.appendChild(node); return node; } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/1ed4a2d3633b75ea84df37cf42458b448996f38d/JiraTaskExternalizer.java/clean/org.eclipse.mylyn.jira.ui/src/org/eclipse/mylyn/internal/jira/JiraTaskExternalizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3010,
17698,
1046,
12,
7469,
3305,
1138,
843,
16,
4319,
997,
16,
3010,
982,
13,
288,
202,
202,
780,
843,
8520,
273,
6041,
8520,
1290,
1046,
12,
2271,
1769,
202,
202,
1046,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3010,
17698,
1046,
12,
7469,
3305,
1138,
843,
16,
4319,
997,
16,
3010,
982,
13,
288,
202,
202,
780,
843,
8520,
273,
6041,
8520,
1290,
1046,
12,
2271,
1769,
202,
202,
1046,
756... |
jj_la1_0 = new int[] {0x66b3c000,0x0,0x40204000,0x26938000,0x0,0x0,0x40204000,0x40204000,0x0,0x0,0x40004000,0x0,0x0,0x40004000,0x40004000,0x0,0x10000000,0x0,0x4432c000,0x4412c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x44128000,0x40000000,0x0,0x0,0x0,0x0,0x0,0x66b38000,0x24128000,0x0,0x10000000,0x4432c000,0x4412c000,0x24128000,0x0,0x24128000,0x66b38000,0x26b38000,0x40000000,0x0,0x0,0x0,0x0,0x0,0x26938000,0x8000000,0x1040000,0x1040000,0x66b38000,0x64128000,0x24128000,0x24128000,0x24128000,0x0,0x0,0x0,0x24128000,0x80000,0x80000000,0x0,0x0,0x24128000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x24128000,0x0,0x24128000,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x24128000,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x4128000,0x0,0x4128000,0x4128000,0x20000000,0x0,0x4128000,0x0,0x4128000,0x4128000,0x20000000,0x24128000,0x0,0x24128000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x24128000,0x0,0x0,0x24128000,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x4432c000,0x4412c000,0x0,0x40004000,0x40004000,0x0,0x26938000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x44128000,0x40000000,0x0,0x0,0x0,0x66b38000,0x26b38000,0x26938000,0x0,0x0,0x24128000,0x1040000,0x1040000,0x66b38000,0x8000000,0x64128000,0x24128000,0x24128000,0x24128000,0x0,0x0,0x0,0x24128000,0x40000000,0x0,0x80000,0x80000000,0x0,0x0,0x24128000,0x0,0x24128000,0x0,0x10000000,0x0,0x0,0x10000000,0x4432c000,0x4412c000,0x0,0x0,0x10000000,0x0,0x0,0x0,}; | jj_la1_0 = new int[] {0x66b3c000,0x0,0x40204000,0x26938000,0x0,0x0,0x40204000,0x40204000,0x0,0x0,0x40004000,0x0,0x40004000,0x40004000,0x0,0x10000000,0x0,0x4432c000,0x4412c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x44128000,0x40000000,0x0,0x0,0x0,0x0,0x0,0x66b38000,0x24128000,0x0,0x10000000,0x4432c000,0x4412c000,0x24128000,0x0,0x24128000,0x66b38000,0x26b38000,0x40000000,0x0,0x0,0x0,0x0,0x0,0x26938000,0x8000000,0x1040000,0x1040000,0x66b38000,0x64128000,0x24128000,0x24128000,0x24128000,0x0,0x0,0x0,0x24128000,0x80000,0x80000000,0x0,0x0,0x24128000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x24128000,0x0,0x24128000,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x24128000,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x4128000,0x0,0x4128000,0x4128000,0x20000000,0x0,0x4128000,0x0,0x4128000,0x4128000,0x20000000,0x24128000,0x0,0x24128000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x24128000,0x0,0x0,0x24128000,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x4432c000,0x4412c000,0x0,0x40004000,0x40004000,0x0,0x26938000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x44128000,0x40000000,0x0,0x0,0x0,0x66b38000,0x26b38000,0x26938000,0x0,0x0,0x24128000,0x1040000,0x1040000,0x66b38000,0x8000000,0x64128000,0x24128000,0x24128000,0x24128000,0x0,0x0,0x0,0x24128000,0x40000000,0x0,0x80000,0x80000000,0x0,0x0,0x24128000,0x0,0x24128000,0x0,0x10000000,0x0,0x0,0x10000000,0x4432c000,0x4412c000,0x0,0x0,0x10000000,0x10000000,0x10000000,0x4128000,0x0,0x10000000,0x10000000,0x4128000,0x0,}; | private static void jj_la1_0() { jj_la1_0 = new int[] {0x66b3c000,0x0,0x40204000,0x26938000,0x0,0x0,0x40204000,0x40204000,0x0,0x0,0x40004000,0x0,0x0,0x40004000,0x40004000,0x0,0x10000000,0x0,0x4432c000,0x4412c000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x44128000,0x40000000,0x0,0x0,0x0,0x0,0x0,0x66b38000,0x24128000,0x0,0x10000000,0x4432c000,0x4412c000,0x24128000,0x0,0x24128000,0x66b38000,0x26b38000,0x40000000,0x0,0x0,0x0,0x0,0x0,0x26938000,0x8000000,0x1040000,0x1040000,0x66b38000,0x64128000,0x24128000,0x24128000,0x24128000,0x0,0x0,0x0,0x24128000,0x80000,0x80000000,0x0,0x0,0x24128000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x24128000,0x0,0x24128000,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x24128000,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x4128000,0x0,0x4128000,0x4128000,0x20000000,0x0,0x4128000,0x0,0x4128000,0x4128000,0x20000000,0x24128000,0x0,0x24128000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x24128000,0x0,0x0,0x24128000,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x4432c000,0x4412c000,0x0,0x40004000,0x40004000,0x0,0x26938000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x44128000,0x40000000,0x0,0x0,0x0,0x66b38000,0x26b38000,0x26938000,0x0,0x0,0x24128000,0x1040000,0x1040000,0x66b38000,0x8000000,0x64128000,0x24128000,0x24128000,0x24128000,0x0,0x0,0x0,0x24128000,0x40000000,0x0,0x80000,0x80000000,0x0,0x0,0x24128000,0x0,0x24128000,0x0,0x10000000,0x0,0x0,0x10000000,0x4432c000,0x4412c000,0x0,0x0,0x10000000,0x0,0x0,0x0,}; } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/9aa0c6bec51662a685ea4b86bc02a52c9e593d8a/Parser.java/clean/dynamicjava/src/koala/dynamicjava/parser/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
760,
918,
10684,
67,
11821,
21,
67,
20,
1435,
288,
1377,
10684,
67,
11821,
21,
67,
20,
273,
394,
509,
8526,
288,
20,
92,
6028,
70,
23,
71,
3784,
16,
20,
92,
20,
16,
20,
92,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
3238,
760,
918,
10684,
67,
11821,
21,
67,
20,
1435,
288,
1377,
10684,
67,
11821,
21,
67,
20,
273,
394,
509,
8526,
288,
20,
92,
6028,
70,
23,
71,
3784,
16,
20,
92,
20,
16,
20,
92,
... |
protected FSEntry addINode(int iNodeNr, String linkName, int fileType) throws IOException { if(isReadOnly()) throw new IOException("Filesystem or directory is mounted read-only!"); //TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface Ext2DirectoryRecord dr; try{ dr = new Ext2DirectoryRecord(fs, iNodeNr, fileType, linkName); addDirectoryRecord(dr); // update the directory inode iNode.update(); INode linkedINode = fs.getINode(iNodeNr); //TODO: add synchronization linkedINode.setLinksCount( linkedINode.getLinksCount()+1 ); return new Ext2Entry(linkedINode, linkName, fileType, fs, this.entry); }catch(FileSystemException fse) { throw new IOException(fse); } } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/76cdfbaf38c1029347a5829758eac206a20e3b16/Ext2Directory.java/buggy/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
4931,
1622,
1289,
23184,
12,
474,
77,
907,
18726,
16,
780,
1232,
461,
16,
474,
768,
559,
13,
15069,
14106,
95,
202,
202,
430,
12,
291,
12066,
10756,
1082,
202,
12849,
2704,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
4931,
1622,
1289,
23184,
12,
474,
77,
907,
18726,
16,
780,
1232,
461,
16,
474,
768,
559,
13,
15069,
14106,
95,
202,
202,
430,
12,
291,
12066,
10756,
1082,
202,
12849,
2704,
1... | ||
String value = ParameterValidationUtil.getDisplayValue( parameterHandle.getDataType( ), parameterHandle .getPattern( ), selectionItem.getValue( ), attrBean.getLocale( ) ); | String value = ParameterValidationUtil.getDisplayValue( null, parameterHandle.getPattern( ), selectionItem.getValue( ), attrBean.getLocale( ) ); | protected void prepareParameterBean( HttpServletRequest request, IViewerReportService service, ScalarParameterBean parameterBean, Locale locale ) throws ReportServiceException { ViewerAttributeBean attrBean = (ViewerAttributeBean) request .getAttribute( IBirtConstants.ATTRIBUTE_BEAN ); assert attrBean != null; InputOptions options = new InputOptions( ); options.setOption( InputOptions.OPT_REQUEST, request ); Collection selectionList = service.getParameterSelectionList( attrBean .getReportDesignHandle( request ), options, parameterBean .getName( ) ); if ( selectionList != null ) { // Get Scalar parameter handle ScalarParameterHandle parameterHandle = (ScalarParameterHandle) attrBean .findParameter( parameter.getName( ) ); for ( Iterator iter = selectionList.iterator( ); iter.hasNext( ); ) { ParameterSelectionChoice selectionItem = (ParameterSelectionChoice) iter .next( ); // Convert parameter value using locale format String value = ParameterValidationUtil.getDisplayValue( parameterHandle.getDataType( ), parameterHandle .getPattern( ), selectionItem.getValue( ), attrBean.getLocale( ) ); String label = selectionItem.getLabel( ); label = ( label == null || label.length( ) <= 0 ) ? value : label; label = ParameterAccessor.htmlEncode( label ); parameterBean.getSelectionList( ).add( label ); parameterBean.getSelectionTable( ).put( label, value ); } } } | 46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/23edb4c10a38a2f5bb7fb0a421e19ae58152c2a9/RadioButtonParameterFragment.java/clean/viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/presentation/aggregation/parameter/RadioButtonParameterFragment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
2911,
1662,
3381,
12,
9984,
590,
16,
1082,
202,
45,
18415,
4820,
1179,
1156,
16,
15791,
1662,
3381,
1569,
3381,
16,
1082,
202,
3916,
2573,
262,
1216,
8706,
15133,
202,
95,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
2911,
1662,
3381,
12,
9984,
590,
16,
1082,
202,
45,
18415,
4820,
1179,
1156,
16,
15791,
1662,
3381,
1569,
3381,
16,
1082,
202,
3916,
2573,
262,
1216,
8706,
15133,
202,
95,... |
return isModified ? this : nilHash(runtime); | return isModified ? this : nilHash(getRuntime()); | public RubyHash reject_bang() { modify(); boolean isModified = false; for (Iterator iter = keyIterator(); iter.hasNext();) { IRubyObject key = (IRubyObject) iter.next(); IRubyObject value = (IRubyObject) valueMap.get(key); IRubyObject shouldDelete = runtime.yield(RubyArray.newArray(runtime, key, value), null, null, true); if (shouldDelete.isTrue()) { valueMap.remove(key); isModified = true; } } return isModified ? this : nilHash(runtime); } | 50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubyHash.java/clean/src/org/jruby/RubyHash.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
2310,
4925,
67,
70,
539,
1435,
288,
202,
202,
17042,
5621,
202,
202,
6494,
22502,
273,
629,
31,
202,
202,
1884,
261,
3198,
1400,
273,
498,
3198,
5621,
1400,
18,
5332,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
19817,
2310,
4925,
67,
70,
539,
1435,
288,
202,
202,
17042,
5621,
202,
202,
6494,
22502,
273,
629,
31,
202,
202,
1884,
261,
3198,
1400,
273,
498,
3198,
5621,
1400,
18,
5332,
2... |
sDbl[stackTop] = idata.itsDoubleTable[getShort(iCode, pc + 1)]; | sDbl[stackTop] = idata.itsDoubleTable[getIndex(iCode, pc + 1)]; | static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, double[] argsDbl, int argShift, int argCount, NativeFunction fnOrScript, InterpreterData idata) throws JavaScriptException { if (cx.interpreterSecurityDomain != idata.securityDomain) { return execWithNewDomain(cx, scope, thisObj, args, argsDbl, argShift, argCount, fnOrScript, idata); } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int VAR_SHFT = 0; final int maxVars = idata.itsMaxVars; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int TRY_STACK_SHFT = LOCAL_SHFT + idata.itsMaxLocals; final int STACK_SHFT = TRY_STACK_SHFT + idata.itsMaxTryDepth;// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for newtemp/usetemp// stack[TRY_STACK_SHFT <= i < STACK_SHFT]: stack of try scopes// stack[STACK_SHFT <= i < STACK_SHFT + idata.itsMaxStack]: stack data// sDbl[TRY_STACK_SHFT <= i < STACK_SHFT]: stack of try block pc, stored as doubles// sDbl[any other i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = idata.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + idata.itsMaxStack) Context.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int tryStackTop = 0; // add TRY_STACK_SHFT to get real index int definedArgs = fnOrScript.argCount; if (definedArgs > argCount) { definedArgs = argCount; } for (int i = 0; i != definedArgs; ++i) { Object arg = args[argShift + i]; stack[VAR_SHFT + i] = arg; if (arg == DBL_MRK) { sDbl[VAR_SHFT + i] = argsDbl[argShift + i]; } } for (int i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } DebugFrame debuggerFrame = null; if (cx.debugger != null) { DebuggableScript dscript = (DebuggableScript)fnOrScript; debuggerFrame = cx.debugger.getFrame(cx, dscript); } if (idata.itsFunctionType != 0) { if (fnOrScript.itsClosure != null) { scope = fnOrScript.itsClosure; } else if (!idata.itsUseDynamicScope) { scope = fnOrScript.getParentScope(); } if (idata.itsCheckThis) { thisObj = ScriptRuntime.getThis(thisObj); } if (idata.itsNeedsActivation) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } } else { scope = ScriptRuntime.initScript(cx, scope, fnOrScript, thisObj, idata.itsFromEvalCode); } if (idata.itsNestedFunctions != null) { if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) Context.codeBug(); for (int i = 0; i < idata.itsNestedFunctions.length; i++) { createFunctionObject(idata.itsNestedFunctions[i], scope, idata.itsFromEvalCode); } } boolean useActivationVars = false; if (debuggerFrame != null) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) { useActivationVars = true; scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } debuggerFrame.onEnter(cx, scope, thisObj, args); } Object result = undefined; byte[] iCode = idata.itsICode; String[] strings = idata.itsStringTable; int pc = 0; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; Loop: while (true) { try { switch (iCode[pc] & 0xff) { // Back indent to ease imlementation reading case TokenStream.ENDTRY : tryStackTop--; break; case TokenStream.TRY : stack[TRY_STACK_SHFT + tryStackTop] = scope; sDbl[TRY_STACK_SHFT + tryStackTop] = (double)pc; ++tryStackTop; // Skip starting pc of catch/finally blocks pc += 4; break; case TokenStream.GE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl <= lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.LE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl <= rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LE(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.GT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && rDbl < lDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(rhs, lhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.LT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl == rDbl && lDbl == lDbl && lDbl < rDbl); } else { valBln = (1 == ScriptRuntime.cmp_LT(lhs, rhs)); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.IN : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.INSTANCEOF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.instanceOf(scope, lhs, rhs); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.EQ : { --stackTop; boolean valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.NE : { --stackTop; boolean valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.SHEQ : { --stackTop; boolean valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.SHNE : { --stackTop; boolean valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case TokenStream.IFNE : { Object val = stack[stackTop]; boolean valBln; if (val != DBL_MRK) { valBln = !ScriptRuntime.toBoolean(val); } else { double valDbl = sDbl[stackTop]; valBln = !(valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; } case TokenStream.IFEQ : { boolean valBln; Object val = stack[stackTop]; if (val != DBL_MRK) { valBln = ScriptRuntime.toBoolean(val); } else { double valDbl = sDbl[stackTop]; valBln = (valDbl == valDbl && valDbl != 0.0); } --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; } pc += 2; break; } case TokenStream.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.GOSUB : sDbl[++stackTop] = pc + 3; if (instructionThreshold != 0) { instructionCount += pc + 3 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc + 1); continue; case TokenStream.RETSUB : { int slot = (iCode[pc + 1] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = (int)sDbl[LOCAL_SHFT + slot]; continue; } case TokenStream.POP : stackTop--; break; case TokenStream.DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case TokenStream.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break; case TokenStream.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case RETURN_UNDEF_ICODE : result = undefined; break Loop; case END_ICODE: break Loop; case TokenStream.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; } case TokenStream.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; } case TokenStream.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; } case TokenStream.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; } case TokenStream.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; } case TokenStream.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; } case TokenStream.URSH : { int rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; } case TokenStream.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case TokenStream.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; } case TokenStream.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; } case TokenStream.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; } case TokenStream.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; } case TokenStream.DIV : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; } case TokenStream.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; } case TokenStream.BINDNAME : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; } case TokenStream.GETBASE : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.getBase(scope, name); pc += 2; break; } case TokenStream.SETNAME : { String name = strings[getShort(iCode, pc + 1)]; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; // what about class cast exception here for lhs? Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.setName(lhs, rhs, scope, name); pc += 2; break; } case TokenStream.DELPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(lhs, rhs); break; } case TokenStream.GETPROP : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; } case TokenStream.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; } case TokenStream.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case TokenStream.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case TokenStream.PROPINC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrement(lhs, name, scope); break; } case TokenStream.PROPDEC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrement(lhs, name, scope); break; } case TokenStream.ELEMINC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrementElem(lhs, rhs, scope); break; } case TokenStream.ELEMDEC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postDecrementElem(lhs, rhs, scope); break; } case TokenStream.GETTHIS : { Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.getThis(lhs); break; } case TokenStream.NEWTEMP : { int slot = (iCode[++pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; break; } case TokenStream.USETEMP : { int slot = (iCode[++pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; break; } case TokenStream.CALLSPECIAL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int lineNum = getShort(iCode, pc + 1); String name = strings[getShort(iCode, pc + 3)]; int count = getShort(iCode, pc + 5); stackTop -= count; Object[] outArgs = getArgsArray(stack, sDbl, stackTop + 1, count); Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, lhs, rhs, outArgs, thisObj, scope, name, lineNum); pc += 6; instructionCount = cx.instructionCount; break; } case TokenStream.CALL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } cx.instructionCount = instructionCount; int count = getShort(iCode, pc + 3); stackTop -= count; int calleeArgShft = stackTop + 1; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; Scriptable calleeScope = scope; if (idata.itsNeedsActivation) { calleeScope = ScriptableObject.getTopLevelScope(scope); } Scriptable calleeThis; if (rhs instanceof Scriptable || rhs == null) { calleeThis = (Scriptable)rhs; } else { calleeThis = ScriptRuntime.toObject(cx, calleeScope, rhs); } if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.call not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; stack[stackTop] = interpret(cx, calleeScope, calleeThis, stack, sDbl, calleeArgShft, count, f, f.itsData); } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.call(cx, calleeScope, calleeThis, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined int i = getShort(iCode, pc + 1); if (i != -1) lhs = strings[i]; } throw NativeGlobal.typeError1 ("msg.isnt.function", ScriptRuntime.toString(lhs), calleeScope); } pc += 4; instructionCount = cx.instructionCount; break; } case TokenStream.NEW : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getShort(iCode, pc + 3); stackTop -= count; int calleeArgShft = stackTop + 1; Object lhs = stack[stackTop]; if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.construct not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; Scriptable newInstance = f.createObject(cx, scope); Object callResult = interpret(cx, scope, newInstance, stack, sDbl, calleeArgShft, count, f, f.itsData); if (callResult instanceof Scriptable && callResult != undefined) { stack[stackTop] = callResult; } else { stack[stackTop] = newInstance; } } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.construct(cx, scope, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined int i = getShort(iCode, pc + 1); if (i != -1) lhs = strings[i]; } throw NativeGlobal.typeError1 ("msg.isnt.function", ScriptRuntime.toString(lhs), scope); } pc += 4; instructionCount = cx.instructionCount; break; } case TokenStream.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; } case TokenStream.TYPEOFNAME : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; } case TokenStream.STRING : stack[++stackTop] = strings[getShort(iCode, pc + 1)]; pc += 2; break; case SHORTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc + 1); pc += 2; break; case INTNUMBER_ICODE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc + 1); pc += 4; break; case TokenStream.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = idata.itsDoubleTable[getShort(iCode, pc + 1)]; pc += 2; break; case TokenStream.NAME : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.name(scope, name); pc += 2; break; } case TokenStream.NAMEINC : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.postIncrement(scope, name); pc += 2; break; } case TokenStream.NAMEDEC : { String name = strings[getShort(iCode, pc + 1)]; stack[++stackTop] = ScriptRuntime.postDecrement(scope, name); pc += 2; break; } case TokenStream.SETVAR : { int slot = (iCode[++pc] & 0xFF); if (!useActivationVars) { stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, slot, val); } break; } case TokenStream.GETVAR : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; } else { stack[stackTop] = activationGet(fnOrScript, scope, slot); } break; } case TokenStream.VARINC : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) + 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; val = doubleWrap(ScriptRuntime.toNumber(val) + 1.0); activationPut(fnOrScript, scope, slot, val); } break; } case TokenStream.VARDEC : { int slot = (iCode[++pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = stack_double(stack, sDbl, stackTop) - 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; val = doubleWrap(ScriptRuntime.toNumber(val) - 1.0); activationPut(fnOrScript, scope, slot, val); } break; } case TokenStream.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case TokenStream.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case TokenStream.NULL : stack[++stackTop] = null; break; case TokenStream.THIS : stack[++stackTop] = thisObj; break; case TokenStream.THISFN : stack[++stackTop] = fnOrScript; break; case TokenStream.FALSE : stack[++stackTop] = Boolean.FALSE; break; case TokenStream.TRUE : stack[++stackTop] = Boolean.TRUE; break; case TokenStream.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case TokenStream.THROW : { Object exception = stack[stackTop]; if (exception == DBL_MRK) exception = doubleWrap(sDbl[stackTop]); --stackTop; throw new JavaScriptException(exception); } case TokenStream.JTHROW : { Object exception = stack[stackTop]; // No need to check for DBL_MRK: exception must be Exception --stackTop; if (exception instanceof JavaScriptException) throw (JavaScriptException)exception; else throw (RuntimeException)exception; } case TokenStream.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); break; } case TokenStream.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); break; case TokenStream.NEWSCOPE : stack[++stackTop] = ScriptRuntime.newScope(); break; case TokenStream.ENUMINIT : { int slot = (iCode[++pc] & 0xFF); Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.initEnum(lhs, scope); break; } case TokenStream.ENUMNEXT : { int slot = (iCode[++pc] & 0xFF); Object val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = ScriptRuntime.nextEnum(val); break; } case TokenStream.GETPROTO : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProto(lhs, scope); break; } case TokenStream.GETPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs); break; } case TokenStream.GETSCOPEPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getParent(lhs, scope); break; } case TokenStream.SETPROTO : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProto(lhs, rhs, scope); break; } case TokenStream.SETPARENT : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setParent(lhs, rhs, scope); break; } case TokenStream.SCOPE : stack[++stackTop] = scope; break; case TokenStream.CLOSURE : { int i = getShort(iCode, pc + 1); InterpretedFunction f = idata.itsNestedFunctions[i]; InterpretedFunction closure = new InterpretedFunction(f, scope, cx); createFunctionObject(closure, scope, idata.itsFromEvalCode); stack[++stackTop] = closure; pc += 2; break; } case TokenStream.REGEXP : { int i = getShort(iCode, pc + 1); stack[++stackTop] = idata.itsRegExpLiterals[i]; pc += 2; break; } case SOURCEFILE_ICODE : cx.interpreterSourceFile = idata.itsSourceFile; break; case LINE_ICODE : { int line = getShort(iCode, pc + 1); cx.interpreterLine = line; if (debuggerFrame != null) { debuggerFrame.onLineChange(cx, line); } pc += 2; break; } default : { dumpICode(idata); throw new RuntimeException ("Unknown icode : "+(iCode[pc] & 0xff)+" @ pc : "+pc); } // end of interpreter switch } pc++; } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } final int SCRIPT_THROW = 0, ECMA = 1, RUNTIME = 2, OTHER = 3; int exType; Object catchObj = ex; // Object seen by script catch for (;;) { if (catchObj instanceof JavaScriptException) { catchObj = ScriptRuntime.unwrapJavaScriptException ((JavaScriptException)catchObj); exType = SCRIPT_THROW; } else if (catchObj instanceof EcmaError) { // an offical ECMA error object, catchObj = ((EcmaError)catchObj).getErrorObject(); exType = ECMA; } else if (catchObj instanceof RuntimeException) { if (catchObj instanceof WrappedException) { Object w = ((WrappedException) catchObj).unwrap(); if (w instanceof Throwable) { catchObj = ex = (Throwable) w; continue; } } catchObj = null; // script can not catch this exType = RUNTIME; } else { // Error instance catchObj = null; // script can not catch this exType = OTHER; } break; } if (exType != OTHER && debuggerFrame != null) { debuggerFrame.onExceptionThrown(cx, ex); } boolean rethrow = true; if (exType != OTHER && tryStackTop > 0) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script --tryStackTop; int try_pc = (int)sDbl[TRY_STACK_SHFT + tryStackTop]; if (exType == SCRIPT_THROW || exType == ECMA) { // Allow JS to catch only JavaScriptException and // EcmaError int catch_offset = getShort(iCode, try_pc + 1); if (catch_offset != 0) { // Has catch block rethrow = false; pc = try_pc + catch_offset; stackTop = STACK_SHFT; stack[stackTop] = catchObj; } } if (rethrow) { int finally_offset = getShort(iCode, try_pc + 3); if (finally_offset != 0) { // has finally block rethrow = false; pc = try_pc + finally_offset; stackTop = STACK_SHFT; stack[stackTop] = ex; } } } if (rethrow) { if (debuggerFrame != null) { debuggerFrame.onExit(cx, true, ex); } if (idata.itsNeedsActivation) { ScriptRuntime.popActivation(cx); } if (exType == SCRIPT_THROW) throw (JavaScriptException)ex; if (exType == ECMA || exType == RUNTIME) throw (RuntimeException)ex; throw (Error)ex; } // We caught an exception, // Notify instruction observer if necessary // and point pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc; // restore scope at try point scope = (Scriptable)stack[TRY_STACK_SHFT + tryStackTop]; } } if (debuggerFrame != null) { debuggerFrame.onExit(cx, false, result); } if (idata.itsNeedsActivation) { ScriptRuntime.popActivation(cx); } if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } return result; } | 19000 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19000/2e16b18d0d24c5129e654d820e6c7f2155b1b7e0/Interpreter.java/buggy/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701... |
sortedUnResolvedDependencies.addAll(this.unResolvedDependencies); | sortedUnResolvedDependencies.addAll( this.unResolvedDependencies ); | public void logStatus( Log log, boolean outputArtifactFilename ) { log.info( "" ); log.info( "The following files have been resolved: " ); if ( this.resolvedDependencies.isEmpty() ) { log.info( " none" ); } else { SortedSet sortedResolvedDependencies = new TreeSet(); sortedResolvedDependencies.addAll(resolvedDependencies); for ( Iterator i = sortedResolvedDependencies.iterator(); i.hasNext(); ) { Artifact artifact = (Artifact) i.next(); String artifactFilename = null; if (outputArtifactFilename) { try { artifact.getFile().getAbsoluteFile(); } catch (NullPointerException e) { //ignore the null pointer, we'll output a null string } } log.info( " " + artifact.getId() + (outputArtifactFilename ? ":" + artifactFilename : "")); } } if ( this.skippedDependencies != null && !this.skippedDependencies.isEmpty() ) { log.info( "" ); log.info( "The following files where skipped: " ); SortedSet sortedSkippedDependencies = new TreeSet(); sortedSkippedDependencies.addAll(this.skippedDependencies); for ( Iterator i = sortedSkippedDependencies.iterator(); i.hasNext(); ) { log.info( " " + ( (Artifact) i.next() ).getId() ); } } log.info( "" ); if ( this.unResolvedDependencies != null && !this.unResolvedDependencies.isEmpty() ) { log.info( "The following files have NOT been resolved: " ); SortedSet sortedUnResolvedDependencies = new TreeSet(); sortedUnResolvedDependencies.addAll(this.unResolvedDependencies); for ( Iterator i = sortedUnResolvedDependencies.iterator(); i.hasNext(); ) { log.info( " " + ( (Artifact) i.next() ).getId() ); } } log.info( "" ); } | 7444 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7444/cc3a01ab903ce7a1610784db39e6913daeb39597/DependencyStatusSets.java/clean/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/utils/DependencyStatusSets.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
613,
1482,
12,
1827,
613,
16,
1250,
876,
7581,
5359,
262,
565,
288,
3639,
613,
18,
1376,
12,
1408,
11272,
3639,
613,
18,
1376,
12,
315,
1986,
3751,
1390,
1240,
2118,
4640,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
613,
1482,
12,
1827,
613,
16,
1250,
876,
7581,
5359,
262,
565,
288,
3639,
613,
18,
1376,
12,
1408,
11272,
3639,
613,
18,
1376,
12,
315,
1986,
3751,
1390,
1240,
2118,
4640,
30... |
return strokes; } | return strokes; } | private static int[] readDeprecatedSequence(IMemento memento) { if (memento == null) throw new NullPointerException(); IMemento[] mementos = memento.getChildren("stroke"); //$NON-NLS-1$ if (mementos == null) throw new NullPointerException(); int[] strokes = new int[mementos.length]; for (int i = 0; i < mementos.length; i++) strokes[i] = readDeprecatedStroke(mementos[i]); return strokes; } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/664efbbd6fd6dba5c4d118b10afe31ab34b6890a/Persistence.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/Persistence.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
509,
8526,
855,
13534,
4021,
12,
3445,
820,
83,
312,
820,
83,
13,
288,
202,
202,
430,
261,
81,
820,
83,
422,
446,
13,
1082,
202,
12849,
394,
10108,
5621,
202,
202,
344... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
509,
8526,
855,
13534,
4021,
12,
3445,
820,
83,
312,
820,
83,
13,
288,
202,
202,
430,
261,
81,
820,
83,
422,
446,
13,
1082,
202,
12849,
394,
10108,
5621,
202,
202,
344... |
limit = ((value != null) ? value.equalsIgnoreCase("true") : true); | limit = "true".equalsIgnoreCase(value); | public void setParam(String name, String value) { if (name.equalsIgnoreCase(MODE)) { try { mode = Integer.parseInt(value); } catch (Exception eBadNumber) { System.err.println("INVALID MODE: "+name); mode = MODE_FRAME; } } else if (name.equalsIgnoreCase(ITEM_UID)) { if (value != null) { itemUID = URLDecoder.decode(value); } } else if (name.equalsIgnoreCase(VERB)) { verbFilter = value; } else if (name.equalsIgnoreCase(LIMIT)) { limit = ((value != null) ? value.equalsIgnoreCase("true") : true); } else if (name.equalsIgnoreCase(PREDICATE)) { pred = value; } else if (name.equalsIgnoreCase(PREDICATE_STYLE)) { predStyle = value; } else if (name.equalsIgnoreCase(PREDICATE_DEBUG)) { predDebug = ((value != null) ? value.equalsIgnoreCase("true") : true); } } | 7981 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7981/2c4e32aa191037dbbbe7c3bafda19f9ba9a1b94c/PlanViewServlet.java/clean/core/src/org/cougaar/planning/servlet/PlanViewServlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
6647,
1071,
918,
22911,
12,
780,
508,
16,
514,
460,
13,
288,
5411,
309,
261,
529,
18,
14963,
5556,
12,
7038,
3719,
288,
2868,
775,
288,
7734,
1965,
273,
2144,
18,
2670,
1702,
12,
1132,
1769,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
6647,
1071,
918,
22911,
12,
780,
508,
16,
514,
460,
13,
288,
5411,
309,
261,
529,
18,
14963,
5556,
12,
7038,
3719,
288,
2868,
775,
288,
7734,
1965,
273,
2144,
18,
2670,
1702,
12,
1132,
1769,... |
if (button instanceof ToggleButton) { ((ToggleButton) button).setSelected(false); } | button.setIconTextMargin(new Extent(10)); | public void actionPerformed(ActionEvent e) { apply(new Applicator() { public void apply(AbstractButton button) { if (button instanceof ToggleButton) { ((ToggleButton) button).setSelected(false); } } }); } | 45635 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45635/2dbe0b66d312df76c1d20dff8fa5f9d1480e7916/ButtonTest.java/clean/src/testapp/interactive/java/nextapp/echo2/testapp/interactive/testscreen/ButtonTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
7734,
2230,
12,
2704,
1716,
1780,
639,
1435,
288,
10792,
1071,
918,
2230,
12,
7469,
3616,
3568,
13,
288,
13491,
309,
261,
5391,
1276,
399,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
26100,
12,
1803,
1133,
425,
13,
288,
7734,
2230,
12,
2704,
1716,
1780,
639,
1435,
288,
10792,
1071,
918,
2230,
12,
7469,
3616,
3568,
13,
288,
13491,
309,
261,
5391,
1276,
399,... |
private Chart getConvertedChart(Chart currentChart, String sNewSubType, Orientation newOrientation, String sNewDimension) { Chart helperModel = (Chart) EcoreUtil.copy(currentChart); if ((currentChart instanceof ChartWithAxes)) { if (currentChart.getType().equals(sType)) { if (!currentChart.getSubType().equals(sNewSubType)) { currentChart.setSubType(sNewSubType); EList axes = ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes(); for (int i = 0; i < axes.size(); i++) { if (sNewSubType.equalsIgnoreCase("Percent Stacked")) { ((Axis) axes.get(i)).setPercent(true); } else { ((Axis) axes.get(i)).setPercent(false); } EList seriesdefinitions = ((Axis) axes.get(i)).getSeriesDefinitions(); for (int j = 0; j < seriesdefinitions.size(); j++) { Series series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries(); if ((sNewSubType.equalsIgnoreCase("Stacked") || sNewSubType .equalsIgnoreCase("Percent Stacked"))) { series.setStacked(true); } else { series.setStacked(false); } } } } } else if (currentChart.getType().equals("Line Chart") || currentChart.getType().equals("Stock Chart") || currentChart.getType().equals("Scatter Chart")) { if (!currentChart.getType().equals("Line Chart")) { currentChart.setSampleData(getConvertedSampleData(currentChart.getSampleData())); ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setType(AxisType.TEXT_LITERAL); } currentChart.setType(sType); currentChart.setSubType(sNewSubType); EList axes = ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes(); for (int i = 0; i < axes.size(); i++) { if (sNewSubType.equalsIgnoreCase("Percent Stacked")) { ((Axis) axes.get(i)).setPercent(true); } else { ((Axis) axes.get(i)).setPercent(false); } EList seriesdefinitions = ((Axis) axes.get(i)).getSeriesDefinitions(); for (int j = 0; j < seriesdefinitions.size(); j++) { Series series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries(); series = getConvertedSeries(series); if ((sNewSubType.equalsIgnoreCase("Stacked") || sNewSubType.equalsIgnoreCase("Percent Stacked"))) { series.setStacked(true); } else { series.setStacked(false); } ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().clear(); ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().add(series); } } } else { return null; } ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setCategoryAxis(true); } else { currentChart = ChartWithAxesImpl.create(); currentChart.setType(sType); currentChart.setSubType(sNewSubType); ((ChartWithAxes) currentChart).setOrientation(newOrientation); currentChart.setDimension(getDimensionFor(sNewDimension)); ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setOrientation(Orientation.HORIZONTAL_LITERAL); ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setType(AxisType.TEXT_LITERAL); ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setCategoryAxis(true); ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)) .setOrientation(Orientation.VERTICAL_LITERAL); ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)) .setType(AxisType.LINEAR_LITERAL); currentChart.setBlock(helperModel.getBlock()); currentChart.setDescription(helperModel.getDescription()); currentChart.setGridColumnCount(helperModel.getGridColumnCount()); currentChart.setSampleData(helperModel.getSampleData()); currentChart.setScript(helperModel.getScript()); currentChart.setSeriesThickness(helperModel.getSeriesThickness()); currentChart.setUnits(helperModel.getUnits()); if (helperModel.getType().equals("Pie Chart")) { ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().clear(); ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().add( ((ChartWithoutAxes) helperModel).getSeriesDefinitions().get(0)); ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)) .getSeriesDefinitions().clear(); ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)) .getSeriesDefinitions().addAll( ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)) .getSeriesDefinitions().get(0)).getSeriesDefinitions()); Series series = ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)) .getSeriesDefinitions().get(0)).getDesignTimeSeries(); series = getConvertedSeries(series); ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions() .get(0)).getSeries().clear(); ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions() .get(0)).getSeries().add(series); EList seriesdefinitions = ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)) .getAssociatedAxes().get(0)).getSeriesDefinitions(); for (int j = 0; j < seriesdefinitions.size(); j++) { series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries(); series = getConvertedSeries(series); if ((sNewSubType.equalsIgnoreCase("Stacked") || sNewSubType.equalsIgnoreCase("Percent Stacked"))) { series.setStacked(true); } else { series.setStacked(false); } ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().clear(); ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().add(series); } } else { return null; } } if (currentChart instanceof ChartWithAxes && !((ChartWithAxes) currentChart).getOrientation().equals(newOrientation)) { ((ChartWithAxes) currentChart).setOrientation(newOrientation); } if (!currentChart.getDimension().equals(getDimensionFor(sNewDimension))) { currentChart.setDimension(getDimensionFor(sNewDimension)); } return currentChart; } | private Chart getConvertedChart( Chart currentChart, String sNewSubType, Orientation newOrientation, String sNewDimension ) { Chart helperModel = (Chart) EcoreUtil.copy( currentChart ); if ( ( currentChart instanceof ChartWithAxes ) ) { if ( currentChart.getType( ).equals( TYPE_LITERAL ) ) { if ( !currentChart.getSubType( ).equals( sNewSubType ) ) { currentChart.setSubType( sNewSubType ); EList axes = ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ) .get( 0 ) ).getAssociatedAxes( ); for ( int i = 0; i < axes.size( ); i++ ) { if ( sNewSubType.equalsIgnoreCase( "Percent Stacked" ) ) { ( (Axis) axes.get( i ) ).setPercent( true ); } else { ( (Axis) axes.get( i ) ).setPercent( false ); } EList seriesdefinitions = ( (Axis) axes.get( i ) ).getSeriesDefinitions( ); for ( int j = 0; j < seriesdefinitions.size( ); j++ ) { Series series = ( (SeriesDefinition) seriesdefinitions.get( j ) ).getDesignTimeSeries( ); if ( ( sNewSubType.equalsIgnoreCase( "Stacked" ) || sNewSubType .equalsIgnoreCase( "Percent Stacked" ) ) ) { series.setStacked( true ); } else { series.setStacked( false ); } } } } } else if ( currentChart.getType( ).equals( LineChart.TYPE_LITERAL ) || currentChart.getType( ).equals( StockChart.TYPE_LITERAL ) || currentChart.getType( ).equals( ScatterChart.TYPE_LITERAL ) ) { if ( !currentChart.getType( ).equals( LineChart.TYPE_LITERAL ) ) { currentChart.setSampleData( getConvertedSampleData( currentChart.getSampleData( ) ) ); ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ) .get( 0 ) ).setType( AxisType.TEXT_LITERAL ); } currentChart.setType( TYPE_LITERAL ); currentChart.setSubType( sNewSubType ); EList axes = ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ) .get( 0 ) ).getAssociatedAxes( ); for ( int i = 0; i < axes.size( ); i++ ) { if ( sNewSubType.equalsIgnoreCase( "Percent Stacked" ) ) { ( (Axis) axes.get( i ) ).setPercent( true ); } else { ( (Axis) axes.get( i ) ).setPercent( false ); } EList seriesdefinitions = ( (Axis) axes.get( i ) ).getSeriesDefinitions( ); for ( int j = 0; j < seriesdefinitions.size( ); j++ ) { Series series = ( (SeriesDefinition) seriesdefinitions.get( j ) ).getDesignTimeSeries( ); series = getConvertedSeries( series ); if ( ( sNewSubType.equalsIgnoreCase( "Stacked" ) || sNewSubType.equalsIgnoreCase( "Percent Stacked" ) ) ) { series.setStacked( true ); } else { series.setStacked( false ); } ( (SeriesDefinition) seriesdefinitions.get( j ) ).getSeries( ) .clear( ); ( (SeriesDefinition) seriesdefinitions.get( j ) ).getSeries( ) .add( series ); } } } else { return null; } ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ).get( 0 ) ).setCategoryAxis( true ); } else { currentChart = ChartWithAxesImpl.create( ); currentChart.setType( TYPE_LITERAL ); currentChart.setSubType( sNewSubType ); ( (ChartWithAxes) currentChart ).setOrientation( newOrientation ); currentChart.setDimension( getDimensionFor( sNewDimension ) ); ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ).get( 0 ) ).setOrientation( Orientation.HORIZONTAL_LITERAL ); ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ).get( 0 ) ).setType( AxisType.TEXT_LITERAL ); ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ).get( 0 ) ).setCategoryAxis( true ); ( (Axis) ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ) .get( 0 ) ).getAssociatedAxes( ).get( 0 ) ).setOrientation( Orientation.VERTICAL_LITERAL ); ( (Axis) ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ) .get( 0 ) ).getAssociatedAxes( ).get( 0 ) ).setType( AxisType.LINEAR_LITERAL ); currentChart.setBlock( helperModel.getBlock( ) ); currentChart.setDescription( helperModel.getDescription( ) ); currentChart.setGridColumnCount( helperModel.getGridColumnCount( ) ); currentChart.setSampleData( helperModel.getSampleData( ) ); currentChart.setScript( helperModel.getScript( ) ); currentChart.setSeriesThickness( helperModel.getSeriesThickness( ) ); currentChart.setUnits( helperModel.getUnits( ) ); if ( helperModel.getType( ).equals( PieChart.TYPE_LITERAL ) ) { ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ).get( 0 ) ).getSeriesDefinitions( ) .clear( ); ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ).get( 0 ) ).getSeriesDefinitions( ) .add( ( (ChartWithoutAxes) helperModel ).getSeriesDefinitions( ) .get( 0 ) ); ( (Axis) ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ) .get( 0 ) ).getAssociatedAxes( ).get( 0 ) ).getSeriesDefinitions( ) .clear( ); ( (Axis) ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ) .get( 0 ) ).getAssociatedAxes( ).get( 0 ) ).getSeriesDefinitions( ) .addAll( ( (SeriesDefinition) ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ) .get( 0 ) ).getSeriesDefinitions( ).get( 0 ) ).getSeriesDefinitions( ) ); Series series = ( (SeriesDefinition) ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ) .get( 0 ) ).getSeriesDefinitions( ).get( 0 ) ).getDesignTimeSeries( ); series = getConvertedSeries( series ); ( (SeriesDefinition) ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ) .get( 0 ) ).getSeriesDefinitions( ).get( 0 ) ).getSeries( ) .clear( ); ( (SeriesDefinition) ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ) .get( 0 ) ).getSeriesDefinitions( ).get( 0 ) ).getSeries( ) .add( series ); EList seriesdefinitions = ( (Axis) ( (Axis) ( (ChartWithAxes) currentChart ).getAxes( ) .get( 0 ) ).getAssociatedAxes( ).get( 0 ) ).getSeriesDefinitions( ); for ( int j = 0; j < seriesdefinitions.size( ); j++ ) { series = ( (SeriesDefinition) seriesdefinitions.get( j ) ).getDesignTimeSeries( ); series = getConvertedSeries( series ); if ( ( sNewSubType.equalsIgnoreCase( "Stacked" ) || sNewSubType.equalsIgnoreCase( "Percent Stacked" ) ) ) { series.setStacked( true ); } else { series.setStacked( false ); } ( (SeriesDefinition) seriesdefinitions.get( j ) ).getSeries( ) .clear( ); ( (SeriesDefinition) seriesdefinitions.get( j ) ).getSeries( ) .add( series ); } } else { return null; } } if ( currentChart instanceof ChartWithAxes && !( (ChartWithAxes) currentChart ).getOrientation( ) .equals( newOrientation ) ) { ( (ChartWithAxes) currentChart ).setOrientation( newOrientation ); } if ( !currentChart.getDimension( ) .equals( getDimensionFor( sNewDimension ) ) ) { currentChart.setDimension( getDimensionFor( sNewDimension ) ); } return currentChart; } | private Chart getConvertedChart(Chart currentChart, String sNewSubType, Orientation newOrientation, String sNewDimension) { Chart helperModel = (Chart) EcoreUtil.copy(currentChart); if ((currentChart instanceof ChartWithAxes)) // Chart is ChartWithAxes { if (currentChart.getType().equals(sType)) // Original chart is of this type (BarChart) { if (!currentChart.getSubType().equals(sNewSubType)) // Original chart is of the required subtype { currentChart.setSubType(sNewSubType); EList axes = ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes(); for (int i = 0; i < axes.size(); i++) { if (sNewSubType.equalsIgnoreCase("Percent Stacked")) //$NON-NLS-1$ { ((Axis) axes.get(i)).setPercent(true); } else { ((Axis) axes.get(i)).setPercent(false); } EList seriesdefinitions = ((Axis) axes.get(i)).getSeriesDefinitions(); for (int j = 0; j < seriesdefinitions.size(); j++) { Series series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries(); if ((sNewSubType.equalsIgnoreCase("Stacked") || sNewSubType //$NON-NLS-1$ .equalsIgnoreCase("Percent Stacked"))) //$NON-NLS-1$ { series.setStacked(true); } else { series.setStacked(false); } } } } } else if (currentChart.getType().equals("Line Chart") || currentChart.getType().equals("Stock Chart") //$NON-NLS-1$ //$NON-NLS-2$ || currentChart.getType().equals("Scatter Chart")) //$NON-NLS-1$ { if (!currentChart.getType().equals("Line Chart")) //$NON-NLS-1$ { currentChart.setSampleData(getConvertedSampleData(currentChart.getSampleData())); ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setType(AxisType.TEXT_LITERAL); } currentChart.setType(sType); currentChart.setSubType(sNewSubType); EList axes = ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes(); for (int i = 0; i < axes.size(); i++) { if (sNewSubType.equalsIgnoreCase("Percent Stacked")) //$NON-NLS-1$ { ((Axis) axes.get(i)).setPercent(true); } else { ((Axis) axes.get(i)).setPercent(false); } EList seriesdefinitions = ((Axis) axes.get(i)).getSeriesDefinitions(); for (int j = 0; j < seriesdefinitions.size(); j++) { Series series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries(); series = getConvertedSeries(series); if ((sNewSubType.equalsIgnoreCase("Stacked") || sNewSubType.equalsIgnoreCase("Percent Stacked"))) //$NON-NLS-1$ //$NON-NLS-2$ { series.setStacked(true); } else { series.setStacked(false); } ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().clear(); ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().add(series); } } } else { return null; } ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setCategoryAxis(true); } else { // Create a new instance of the correct type and set initial properties currentChart = ChartWithAxesImpl.create(); currentChart.setType(sType); currentChart.setSubType(sNewSubType); ((ChartWithAxes) currentChart).setOrientation(newOrientation); currentChart.setDimension(getDimensionFor(sNewDimension)); ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setOrientation(Orientation.HORIZONTAL_LITERAL); ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setType(AxisType.TEXT_LITERAL); ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setCategoryAxis(true); ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)) .setOrientation(Orientation.VERTICAL_LITERAL); ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)) .setType(AxisType.LINEAR_LITERAL); // Copy generic chart properties from the old chart currentChart.setBlock(helperModel.getBlock()); currentChart.setDescription(helperModel.getDescription()); currentChart.setGridColumnCount(helperModel.getGridColumnCount()); currentChart.setSampleData(helperModel.getSampleData()); currentChart.setScript(helperModel.getScript()); currentChart.setSeriesThickness(helperModel.getSeriesThickness()); currentChart.setUnits(helperModel.getUnits()); if (helperModel.getType().equals("Pie Chart")) //$NON-NLS-1$ { // Clear existing series definitions ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().clear(); // Copy base series definitions ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().add( ((ChartWithoutAxes) helperModel).getSeriesDefinitions().get(0)); // Clear existing series definitions ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)) .getSeriesDefinitions().clear(); // Copy orthogonal series definitions ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)) .getSeriesDefinitions().addAll( ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)) .getSeriesDefinitions().get(0)).getSeriesDefinitions()); // Update the base series Series series = ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)) .getSeriesDefinitions().get(0)).getDesignTimeSeries(); series = getConvertedSeries(series); // Clear existing series ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions() .get(0)).getSeries().clear(); // Add converted series ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions() .get(0)).getSeries().add(series); // Update the orthogonal series EList seriesdefinitions = ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)) .getAssociatedAxes().get(0)).getSeriesDefinitions(); for (int j = 0; j < seriesdefinitions.size(); j++) { series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries(); series = getConvertedSeries(series); if ((sNewSubType.equalsIgnoreCase("Stacked") || sNewSubType.equalsIgnoreCase("Percent Stacked"))) //$NON-NLS-1$ //$NON-NLS-2$ { series.setStacked(true); } else { series.setStacked(false); } // Clear any existing series ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().clear(); // Add the new series ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().add(series); } } else { return null; } } if (currentChart instanceof ChartWithAxes && !((ChartWithAxes) currentChart).getOrientation().equals(newOrientation)) { ((ChartWithAxes) currentChart).setOrientation(newOrientation); } if (!currentChart.getDimension().equals(getDimensionFor(sNewDimension))) { currentChart.setDimension(getDimensionFor(sNewDimension)); } return currentChart; } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/349f24e6a8f8484f0f1f1af682b4952337cac402/BarChart.java/clean/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/type/BarChart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
14804,
336,
22063,
7984,
12,
7984,
783,
7984,
16,
514,
272,
1908,
30511,
16,
531,
12556,
394,
14097,
16,
3639,
514,
272,
1908,
8611,
13,
565,
288,
3639,
14804,
4222,
1488,
273,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
14804,
336,
22063,
7984,
12,
7984,
783,
7984,
16,
514,
272,
1908,
30511,
16,
531,
12556,
394,
14097,
16,
3639,
514,
272,
1908,
8611,
13,
565,
288,
3639,
14804,
4222,
1488,
273,
261,... |
public static final String zeroPadString(String string, int length) { | public static String zeroPadString(String string, int length) { | public static final String zeroPadString(String string, int length) { if (string == null || string.length() > length) { return string; } StringBuilder buf = new StringBuilder(length); buf.append(zeroArray, 0, length - string.length()).append(string); return buf.toString(); } | 6312 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6312/7e7a6c1b77d3198029d3b4e7af15ea5044f355c8/StringUtils.java/buggy/src/java/org/jivesoftware/util/StringUtils.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
3634,
14878,
780,
12,
780,
533,
16,
509,
769,
13,
288,
3639,
309,
261,
1080,
422,
446,
747,
533,
18,
2469,
1435,
405,
769,
13,
288,
5411,
327,
533,
31,
3639,
289,
3639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
514,
3634,
14878,
780,
12,
780,
533,
16,
509,
769,
13,
288,
3639,
309,
261,
1080,
422,
446,
747,
533,
18,
2469,
1435,
405,
769,
13,
288,
5411,
327,
533,
31,
3639,
289,
3639... |
addTest(new TestSuite(ActionSetTests.class)); addTest(new TestSuite(DynamicSupportTests.class)); addTest(new TestSuite(BrowserTests.class)); addTest(new TestSuite(PreferencePageTests.class)); addTest(new TestSuite(KeywordTests.class)); addTest(new TestSuite(PropertyPageTests.class)); addTest(new TestSuite(HelpSupportTests.class)); addTest(new TestSuite(EncodingTests.class)); addTest(new TestSuite(DecoratorTests.class)); addTest(new TestSuite(StartupTests.class)); addTest(new TestSuite(EditorTests.class)); addTest(new TestSuite(IntroTests.class)); addTest(new TestSuite(PerspectiveTests.class)); addTest(new TestSuite(ViewTests.class)); addTest(new TestSuite(ActionSetTests.class)); addTest(new TestSuite(NewWizardTests.class)); addTest(new TestSuite(ObjectContributionTests.class)); } | addTest(new TestSuite(ActionSetTests.class)); addTest(new TestSuite(ActivitySupportTests.class)); addTest(new TestSuite(BrowserTests.class)); addTest(new TestSuite(PreferencePageTests.class)); addTest(new TestSuite(KeywordTests.class)); addTest(new TestSuite(PropertyPageTests.class)); addTest(new TestSuite(HelpSupportTests.class)); addTest(new TestSuite(EncodingTests.class)); addTest(new TestSuite(DecoratorTests.class)); addTest(new TestSuite(StartupTests.class)); addTest(new TestSuite(EditorTests.class)); addTest(new TestSuite(IntroTests.class)); addTest(new TestSuite(PerspectiveTests.class)); addTest(new TestSuite(ViewTests.class)); addTest(new TestSuite(ActionSetTests.class)); addTest(new TestSuite(NewWizardTests.class)); addTest(new TestSuite(ObjectContributionTests.class)); addTest(new TestSuite(DynamicSupportTests.class)); } | public DynamicPluginsTestSuite() { addTest(new TestSuite(ActionSetTests.class)); addTest(new TestSuite(DynamicSupportTests.class)); addTest(new TestSuite(BrowserTests.class)); addTest(new TestSuite(PreferencePageTests.class)); addTest(new TestSuite(KeywordTests.class)); addTest(new TestSuite(PropertyPageTests.class)); addTest(new TestSuite(HelpSupportTests.class)); addTest(new TestSuite(EncodingTests.class)); addTest(new TestSuite(DecoratorTests.class)); addTest(new TestSuite(StartupTests.class)); addTest(new TestSuite(EditorTests.class)); addTest(new TestSuite(IntroTests.class)); addTest(new TestSuite(PerspectiveTests.class)); addTest(new TestSuite(ViewTests.class)); addTest(new TestSuite(ActionSetTests.class)); addTest(new TestSuite(NewWizardTests.class)); addTest(new TestSuite(ObjectContributionTests.class)); } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/18aa626ed5129ff3e8459e02ddd7452c22cd38c1/DynamicPluginsTestSuite.java/buggy/tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dynamicplugins/DynamicPluginsTestSuite.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12208,
9461,
4709,
13587,
1435,
288,
3639,
527,
4709,
12,
2704,
7766,
13587,
12,
1803,
694,
14650,
18,
1106,
10019,
377,
202,
1289,
4709,
12,
2704,
7766,
13587,
12,
9791,
6289,
14650,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12208,
9461,
4709,
13587,
1435,
288,
3639,
527,
4709,
12,
2704,
7766,
13587,
12,
1803,
694,
14650,
18,
1106,
10019,
377,
202,
1289,
4709,
12,
2704,
7766,
13587,
12,
9791,
6289,
14650,... |
final PsiExpression qualifier = methodExpression.getQualifierExpression(); if (qualifier == null) { | final PsiExpression qualifier = methodExpression.getQualifierExpression(); if(qualifier == null){ | private static boolean isHasNext(PsiExpression condition, String iterator) { if (!(condition instanceof PsiMethodCallExpression)) { return false; } final PsiMethodCallExpression call = (PsiMethodCallExpression) condition; final PsiExpressionList argumentList = call.getArgumentList(); if (argumentList == null) { return false; } final PsiExpression[] args = argumentList.getExpressions(); if (args.length != 0) { return false; } final PsiReferenceExpression methodExpression = call.getMethodExpression(); if (methodExpression == null) { return false; } final String methodName = methodExpression.getReferenceName(); if (!"hasNext".equals(methodName)) { return false; } final PsiExpression qualifier = methodExpression.getQualifierExpression(); if (qualifier == null) { return true; } final String target = qualifier.getText(); return iterator.equals(target); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/dba8b183fc1b08e7ad664812bfc0c64d1e4abd3c/ForCanBeForeachInspection.java/clean/plugins/InspectionGadgets/src/com/siyeh/ig/verbose/ForCanBeForeachInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
353,
5582,
2134,
12,
52,
7722,
2300,
2269,
16,
514,
2775,
13,
288,
3639,
309,
16051,
12,
4175,
1276,
453,
7722,
12592,
2300,
3719,
288,
5411,
327,
629,
31,
3639,
289,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
353,
5582,
2134,
12,
52,
7722,
2300,
2269,
16,
514,
2775,
13,
288,
3639,
309,
16051,
12,
4175,
1276,
453,
7722,
12592,
2300,
3719,
288,
5411,
327,
629,
31,
3639,
289,
3... |
next = node.getNextSibling(); | node = next; | private void prepareForSerialization(XMLSerializer ser, Node node) { ser.reset(); ser.features = features; ser.fDOMErrorHandler = fErrorHandler; ser.fNamespaces = (features & NAMESPACES) != 0; ser.fNamespacePrefixes = (features & NSDECL) != 0; ser._format.setOmitComments((features & COMMENTS)==0); ser._format.setOmitXMLDeclaration((features & XMLDECL) == 0); if ((features & WELLFORMED) != 0) { // REVISIT: this is inefficient implementation of well-formness. Instead, we should check // well-formness as we serialize the tree Node next, root; root = node; Method versionChanged; boolean verifyNames = true; Document document =(node.getNodeType() == Node.DOCUMENT_NODE) ? (Document) node : node.getOwnerDocument(); try { versionChanged = document.getClass().getMethod("isXMLVersionChanged()", new Class[] {}); if (versionChanged != null) { verifyNames = ((Boolean)versionChanged.invoke(document, (Object[]) null)).booleanValue(); } } catch (Exception e) { //no way to test the version... //ignore the exception } while (node != null) { verify(node, verifyNames, false); // Move down to first child next = node.getFirstChild(); // No child nodes, so walk tree while (next == null) { // Move to sibling if possible. next = node.getNextSibling(); if (next == null){ node = node.getParentNode(); if (node == null || root == node){ next = null; break; } next = node.getNextSibling(); } } node = next; } } } | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/76d3e42bf13d51baa2d64904f1815445ba3a8706/DOMSerializerImpl.java/clean/src/org/apache/xml/serialize/DOMSerializerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2911,
1290,
16764,
12,
4201,
6306,
703,
16,
2029,
756,
13,
288,
3639,
703,
18,
6208,
5621,
3639,
703,
18,
7139,
273,
4467,
31,
3639,
703,
18,
74,
8168,
17729,
273,
284,
17729... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
2911,
1290,
16764,
12,
4201,
6306,
703,
16,
2029,
756,
13,
288,
3639,
703,
18,
6208,
5621,
3639,
703,
18,
7139,
273,
4467,
31,
3639,
703,
18,
74,
8168,
17729,
273,
284,
17729... |
Insets insets = getInsets(); int w = defaultSize + insets.left + insets.right; int h = defaultSize + insets.top + insets.bottom; return new Dimension(w, h); | return PREFERRED_SIZE; | public Dimension getPreferredSize() { Insets insets = getInsets(); int w = defaultSize + insets.left + insets.right; int h = defaultSize + insets.top + insets.bottom; return new Dimension(w, h); } | 47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/2499b44eed637a4ae6c8b465885faa2b4ac26182/BasicArrowButton.java/clean/javax/swing/plaf/basic/BasicArrowButton.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
12822,
4193,
1225,
1435,
225,
288,
565,
22300,
23576,
273,
7854,
4424,
5621,
565,
509,
341,
273,
805,
1225,
397,
23576,
18,
4482,
397,
23576,
18,
4083,
31,
565,
509,
366,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
13037,
12822,
4193,
1225,
1435,
225,
288,
565,
22300,
23576,
273,
7854,
4424,
5621,
565,
509,
341,
273,
805,
1225,
397,
23576,
18,
4482,
397,
23576,
18,
4083,
31,
565,
509,
366,
273... |
offset++; | public char read() { int length = buf.length(); char c; if (length > 0) { c = buf.charAt(length - 1); buf.deleteCharAt(length - 1); } else { c = wrappedRead(); // EOF...Do not advance column...Go straight to jail if (c == 0) { offset++; return c; } } // Reset column back to zero on first read of a line (note it will be- // come '1' by the time it leaves read(). if (nextCharIsOnANewLine) { nextCharIsOnANewLine = false; column = 0; } offset++; column++; if (c == '\n') { line++; // Since we are not reading off of unread buffer we must at the // end of a new line for the first time. Add it. if (length < 1) { lineWidths.add(new Integer(column)); } nextCharIsOnANewLine = true; } return c; } | 45753 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45753/67a441c8ea70c9532cdedb2001a6741b63e793ae/LexerSource.java/buggy/src/org/jruby/lexer/yacc/LexerSource.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1149,
855,
1435,
288,
377,
202,
474,
769,
273,
1681,
18,
2469,
5621,
377,
202,
3001,
276,
31,
377,
202,
377,
202,
430,
261,
2469,
405,
374,
13,
288,
377,
202,
202,
71,
273,
1681... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
1149,
855,
1435,
288,
377,
202,
474,
769,
273,
1681,
18,
2469,
5621,
377,
202,
3001,
276,
31,
377,
202,
377,
202,
430,
261,
2469,
405,
374,
13,
288,
377,
202,
202,
71,
273,
1681... | |
private void setUserLayoutDOM( Node n, String parentNodeId ) throws PortalException { Element node = (Element) n; NodeList childNodes = node.getChildNodes(); IALNodeDescription nodeDesc = ALNode.createUserLayoutNodeDescription(node); String nodeId = node.getAttribute("ID"); nodeDesc.setId(nodeId); nodeDesc.setName(node.getAttribute("name")); nodeDesc.setFragmentId(node.getAttribute("fragmentID")); nodeDesc.setHidden((node.getAttribute("hidden").equalsIgnoreCase("true"))?true:false); nodeDesc.setImmutable((node.getAttribute("immutable").equalsIgnoreCase("true"))?true:false); nodeDesc.setUnremovable((node.getAttribute("unremovable").equalsIgnoreCase("true"))?true:false); nodeDesc.setHidden((node.getAttribute("hidden").equalsIgnoreCase("true"))?true:false); ALNode layoutNode = null; IALChannelDescription channelDesc = null; if (nodeDesc instanceof IALChannelDescription) channelDesc = (IALChannelDescription) nodeDesc; // Getting parameters and restrictions for ( int i = 0; i < childNodes.getLength(); i++ ) { Node childNode = childNodes.item(i); String nodeName = childNode.getNodeName(); NamedNodeMap attributes = childNode.getAttributes(); if ( PARAMETER.equals(nodeName) && channelDesc != null ) { Node paramNameNode = attributes.getNamedItem("name"); String paramName = (paramNameNode!=null)?paramNameNode.getFirstChild().getNodeValue():null; Node paramValueNode = attributes.getNamedItem("value"); String paramValue = (paramValueNode!=null)?paramValueNode.getFirstChild().getNodeValue():null; Node overParamNode = attributes.getNamedItem("override"); String overParam = (overParamNode!=null)?overParamNode.getFirstChild().getNodeValue():null; if ( paramName != null ) { channelDesc.setParameterValue(paramName, paramValue); channelDesc.setParameterOverride(paramName, "yes".equalsIgnoreCase(overParam)?true:false); } } else if ( RESTRICTION.equals(nodeName) ) { Node restrPathNode = attributes.getNamedItem("path"); String restrPath = (restrPathNode!=null)?restrPathNode.getFirstChild().getNodeValue():null; Node restrValueNode = attributes.getNamedItem("value"); String restrValue = (restrValueNode!=null)?restrValueNode.getFirstChild().getNodeValue():null; Node restrTypeNode = attributes.getNamedItem("type"); String restrType = (restrTypeNode!=null)?restrTypeNode.getFirstChild().getNodeValue():"0"; if ( restrValue != null ) { IUserLayoutRestriction restriction = UserLayoutRestrictionFactory.createRestriction(CommonUtils.parseInt(restrType),restrValue,restrPath); nodeDesc.addRestriction(restriction); } } } if ( channelDesc != null ) { channelDesc.setChannelPublishId(node.getAttribute("chanID")); channelDesc.setChannelTypeId(node.getAttribute("typeID")); channelDesc.setClassName(node.getAttribute("class")); channelDesc.setDescription(node.getAttribute("description")); channelDesc.setEditable((node.getAttribute("editable").equalsIgnoreCase("true"))?true:false); channelDesc.setHasAbout((node.getAttribute("hasAbout").equalsIgnoreCase("true"))?true:false); channelDesc.setHasHelp((node.getAttribute("hasHelp").equalsIgnoreCase("true"))?true:false); channelDesc.setFunctionalName(node.getAttribute("fname")); channelDesc.setTimeout(Long.parseLong(node.getAttribute("timeout"))); channelDesc.setTitle(node.getAttribute("title")); // Adding to the layout layoutNode = new ALNode(channelDesc); } else { layoutNode = new ALFolder(nodeDesc); } // Setting priority value layoutNode.setPriority(CommonUtils.parseInt(node.getAttribute("priority"),0)); ALFolder parentFolder = getLayoutFolder(parentNodeId); // Binding the current node to the parent child list and parentNodeId to the current node if ( parentFolder != null ) { //parentFolder.addChildNode(nodeDesc.getId()); layoutNode.setParentNodeId(parentNodeId); } Element nextNode = (Element) node.getNextSibling(); Element prevNode = (Element) node.getPreviousSibling(); if ( nextNode != null && isNodeFolderOrChannel(nextNode) ) layoutNode.setNextNodeId(nextNode.getAttribute("ID")); if ( prevNode != null && isNodeFolderOrChannel(prevNode) ) layoutNode.setPreviousNodeId(prevNode.getAttribute("ID") ); //System.out.println("DOM FIRST: " + ((Element)node.getFirstChild()).getAttribute("ID")); // Setting the first child node ID if ( FOLDER.equals(layoutNode.getNodeType()) ) { String id = ((Element)node.getFirstChild()).getAttribute("ID"); if ( id != null && id.length() > 0 ) ((ALFolder)layoutNode).setFirstChildNodeId(id); } // Putting the LayoutNode object into the layout layout.put(nodeDesc.getId(), layoutNode); // Recurrence for all children for ( int i = 0; i < childNodes.getLength() && (layoutNode.getNodeType().equals(FOLDER)); i++ ) { Element childNode = (Element) childNodes.item(i); if ( isNodeFolderOrChannel ( childNode ) ) setUserLayoutDOM ( childNode, nodeDesc.getId() ); } } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/9e6e019dfa270ce06e7e8b3026e4b2d7705d1e7c/AggregatedUserLayoutImpl.java/buggy/source/org/jasig/portal/layout/AggregatedUserLayoutImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
14365,
3744,
8168,
12,
2029,
290,
16,
514,
7234,
548,
262,
1216,
25478,
503,
288,
1046,
756,
273,
261,
1046,
13,
290,
31,
19914,
10582,
273,
756,
18,
588,
22460,
5621,
6365,
907,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
918,
14365,
3744,
8168,
12,
2029,
290,
16,
514,
7234,
548,
262,
1216,
25478,
503,
288,
1046,
756,
273,
261,
1046,
13,
290,
31,
19914,
10582,
273,
756,
18,
588,
22460,
5621,
6365,
907,
... | ||
public void handleException(Throwable e) { super.handleException(e); String msg = e.getMessage() == null ? "" : e.getMessage(); result[0] = new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, IWorkbenchConfigurer.RESTORE_CODE_RESET, msg, e); stateFile.delete(); } | public void handleException(Throwable e) { super.handleException(e); String msg = e.getMessage() == null ? "" : e.getMessage(); result[0] = new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, IWorkbenchConfigurer.RESTORE_CODE_RESET, msg, e); stateFile.delete(); } | /* package */IStatus restoreState() { if (!getWorkbenchConfigurer().getSaveAndRestore()) { String msg = WorkbenchMessages.Workbench_restoreDisabled; return new Status(IStatus.WARNING, WorkbenchPlugin.PI_WORKBENCH, IWorkbenchConfigurer.RESTORE_CODE_RESET, msg, null); } // Read the workbench state file. final File stateFile = getWorkbenchStateFile(); // If there is no state file cause one to open. if (stateFile == null || !stateFile.exists()) { String msg = WorkbenchMessages.Workbench_noStateToRestore; return new Status(IStatus.WARNING, WorkbenchPlugin.PI_WORKBENCH, IWorkbenchConfigurer.RESTORE_CODE_RESET, msg, null); } final IStatus result[] = { new Status(IStatus.OK, WorkbenchPlugin.PI_WORKBENCH, IStatus.OK, "", null) }; //$NON-NLS-1$ Platform.run(new SafeRunnable(WorkbenchMessages.ErrorReadingState) { public void run() throws Exception { FileInputStream input = new FileInputStream(stateFile); BufferedReader reader = new BufferedReader( new InputStreamReader(input, "utf-8")); //$NON-NLS-1$ IMemento memento = XMLMemento.createReadRoot(reader); // Validate known version format String version = memento .getString(IWorkbenchConstants.TAG_VERSION); boolean valid = false; for (int i = 0; i < VERSION_STRING.length; i++) { if (VERSION_STRING[i].equals(version)) { valid = true; break; } } if (!valid) { reader.close(); String msg = WorkbenchMessages.Invalid_workbench_state_ve; MessageDialog.openError((Shell) null, WorkbenchMessages.Restoring_Problems, msg); //$NON-NLS-1$ stateFile.delete(); result[0] = new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, IWorkbenchConfigurer.RESTORE_CODE_RESET, msg, null); return; } // Validate compatible version format // We no longer support the release 1.0 format if (VERSION_STRING[0].equals(version)) { reader.close(); String msg = WorkbenchMessages.Workbench_incompatibleSavedStateVersion; boolean ignoreSavedState = new MessageDialog( null, WorkbenchMessages.Workbench_incompatibleUIState, null, msg, MessageDialog.WARNING, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0) .open() == 0; // OK is the default if (ignoreSavedState) { stateFile.delete(); result[0] = new Status( IStatus.WARNING, WorkbenchPlugin.PI_WORKBENCH, IWorkbenchConfigurer.RESTORE_CODE_RESET, msg, null); } else { result[0] = new Status(IStatus.WARNING, WorkbenchPlugin.PI_WORKBENCH, IWorkbenchConfigurer.RESTORE_CODE_EXIT, msg, null); } return; } // Restore the saved state IStatus restoreResult = restoreState(memento); reader.close(); if (restoreResult.getSeverity() == IStatus.ERROR) { ErrorDialog .openError( null, WorkbenchMessages.Workspace_problemsTitle, WorkbenchMessages.Workbench_problemsRestoringMsg, restoreResult); } } public void handleException(Throwable e) { super.handleException(e); String msg = e.getMessage() == null ? "" : e.getMessage(); //$NON-NLS-1$ result[0] = new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, IWorkbenchConfigurer.RESTORE_CODE_RESET, msg, e); stateFile.delete(); } }); // ensure at least one window was opened if (result[0].isOK() && windowManager.getWindows().length == 0) { String msg = WorkbenchMessages.Workbench_noWindowsRestored; result[0] = new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, IWorkbenchConfigurer.RESTORE_CODE_RESET, msg, null); } return result[0]; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/9337b828e86179850647141c34d497be28275ed2/Workbench.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1748,
2181,
1195,
45,
1482,
5217,
1119,
1435,
288,
3639,
309,
16051,
588,
2421,
22144,
809,
11278,
7675,
588,
4755,
1876,
10874,
10756,
288,
5411,
514,
1234,
273,
4147,
22144,
5058,
18,
242... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1748,
2181,
1195,
45,
1482,
5217,
1119,
1435,
288,
3639,
309,
16051,
588,
2421,
22144,
809,
11278,
7675,
588,
4755,
1876,
10874,
10756,
288,
5411,
514,
1234,
273,
4147,
22144,
5058,
18,
242... |
_log.logTime("main.interp result: " + result); result.apply(getResultHandler()); | try { _log.log(this + ".interpretResult(" + result + ")"); result.apply(getResultHandler()); } catch (Throwable t) { _log.log(this + "interpretResult threw " + t.toString()); } | public void interpretResult(InterpretResult result) throws RemoteException { // try { _log.logTime("main.interp result: " + result); result.apply(getResultHandler()); // } // catch (Throwable t) { // _log.logTime("EXCEPTION in interpretResult: " + t.toString()); // } } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/fa54651cc7ac0d03884ebcafd7e8520df74651a1/MainJVM.java/buggy/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/MainJVM.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
10634,
1253,
12,
2465,
15089,
1253,
563,
13,
1216,
18361,
288,
565,
368,
377,
775,
288,
565,
389,
1330,
18,
1330,
950,
2932,
5254,
18,
24940,
563,
30,
315,
397,
563,
1769,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
10634,
1253,
12,
2465,
15089,
1253,
563,
13,
1216,
18361,
288,
565,
368,
377,
775,
288,
565,
389,
1330,
18,
1330,
950,
2932,
5254,
18,
24940,
563,
30,
315,
397,
563,
1769,
36... |
boolean noMetaData) | boolean noMetaData, boolean sendNow) | private void executeSQL70(String sql, String procName, ParamInfo[] parameters, boolean noMetaData) throws IOException, SQLException { int prepareSql = connection.getPrepareSql(); if (parameters == null && (prepareSql == EXECUTE_SQL || prepareSql == PREPARE || prepareSql == PREPEXEC)) { // Downgrade EXECUTE_SQL, PREPARE and PREPEXEC to UNPREPARED // if there are no parameters. // // Should we downgrade TEMPORARY_STORED_PROCEDURES as well? // No it may be a complex select with no parameters but costly to // evaluate for each execution. prepareSql = UNPREPARED; } if (isPreparedProcedureName(procName)) { // If the procedure is a prepared handle then redefine the // procedure name as sp_execute with the handle as a parameter. ParamInfo params[]; if (parameters != null) { params = new ParamInfo[1 + parameters.length]; System.arraycopy(parameters, 0, params, 1, parameters.length); } else { params = new ParamInfo[1]; } params[0] = new ParamInfo(Types.INTEGER, new Integer(procName), ParamInfo.INPUT); TdsData.getNativeType(connection, params[0]); parameters = params; // Use sp_execute approach procName = "sp_execute"; } else if (procName == null) { if (prepareSql == PREPEXEC) { ParamInfo params[] = new ParamInfo[3 + parameters.length]; System.arraycopy(parameters, 0, params, 3, parameters.length); // Setup prepare handle param params[0] = new ParamInfo(Types.INTEGER, null, ParamInfo.OUTPUT); TdsData.getNativeType(connection, params[0]); // Setup parameter descriptor param params[1] = new ParamInfo(Types.LONGVARCHAR, Support.getParameterDefinitions(parameters), ParamInfo.UNICODE); TdsData.getNativeType(connection, params[1]); // Setup sql statemement param params[2] = new ParamInfo(Types.LONGVARCHAR, Support.substituteParamMarkers(sql, parameters), ParamInfo.UNICODE); TdsData.getNativeType(connection, params[2]); parameters = params; // Use sp_prepexec approach procName = "sp_prepexec"; } else if (prepareSql != TdsCore.UNPREPARED && parameters != null) { ParamInfo[] params; params = new ParamInfo[2 + parameters.length]; System.arraycopy(parameters, 0, params, 2, parameters.length); params[0] = new ParamInfo(Types.LONGVARCHAR, Support.substituteParamMarkers(sql, parameters), ParamInfo.UNICODE); TdsData.getNativeType(connection, params[0]); params[1] = new ParamInfo(Types.LONGVARCHAR, Support.getParameterDefinitions(parameters), ParamInfo.UNICODE); TdsData.getNativeType(connection, params[1]); parameters = params; // Use sp_executesql approach procName = "sp_executesql"; } } if (procName != null) { // RPC call out.setPacketType(RPC_PKT); Integer shortcut; if (tdsVersion >= Driver.TDS80 && (shortcut = (Integer) tds8SpNames.get(procName)) != null) { // Use the shortcut form of procedure name for TDS8 out.write((short) -1); out.write((short) shortcut.shortValue()); } else { out.write((short) procName.length()); out.write(procName); } out.write((short) (noMetaData ? 2 : 0)); if (parameters != null) { for (int i = nextParam + 1; i < parameters.length; i++) { if (parameters[i].name != null) { out.write((byte) parameters[i].name.length()); out.write(parameters[i].name); } else { out.write((byte) 0); } out.write((byte) (parameters[i].isOutput ? 1 : 0)); TdsData.writeParam(out, connection.getCharsetInfo(), connection.getCollation(), parameters[i]); } } } else if (sql.length() > 0) { if (parameters != null) { sql = Support.substituteParameters(sql, parameters, tdsVersion); } // Simple query out.setPacketType(QUERY_PKT); out.write(sql); } } | 439 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/439/1e35749e3999006e55f5fcf79cb36b5060b07123/TdsCore.java/buggy/trunk/jtds/src/main/net/sourceforge/jtds/jdbc/TdsCore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1836,
3997,
7301,
12,
780,
1847,
16,
17311,
514,
5418,
461,
16,
17311,
3014,
966,
8526,
1472,
16,
17311,
1250,
1158,
6998,
16,
1250,
1366,
8674,
13,
3639,
1216,
1860,
16,
6483,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1836,
3997,
7301,
12,
780,
1847,
16,
17311,
514,
5418,
461,
16,
17311,
3014,
966,
8526,
1472,
16,
17311,
1250,
1158,
6998,
16,
1250,
1366,
8674,
13,
3639,
1216,
1860,
16,
6483,... |
attachmentsTableViewer.setLabelProvider(new ITableLabelProvider() { public Image getColumnImage(Object element, int columnIndex) { return null; } public String getColumnText(Object element, int columnIndex) { RepositoryAttachment attachment = (RepositoryAttachment) element; switch (columnIndex) { case 0: return attachment.getDescription(); case 1: if (attachment.isPatch()) { return "patch"; } else { return attachment.getContentType(); } case 2: return attachment.getCreator(); case 3: return attachment.getDateCreated(); } return "unrecognized column"; } public void addListener(ILabelProviderListener listener) { } public void dispose() { } public boolean isLabelProperty(Object element, String property) { return false; } public void removeListener(ILabelProviderListener listener) { } }); | attachmentsTableViewer.setLabelProvider(new AttachmentTableLabelProvider(new AttachmentLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator())); | protected void createAttachmentLayout(Composite composite) { Section section = toolkit.createSection(composite, ExpandableComposite.TITLE_BAR | Section.TWISTIE); section.setText(LABEL_SECTION_ATTACHMENTS); section.setExpanded(getRepositoryTaskData().getAttachments().size() > 0); section.setLayout(new GridLayout()); section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); final Composite attachmentsComposite = toolkit.createComposite(section); attachmentsComposite.setLayout(new GridLayout(2, false)); attachmentsComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); section.setClient(attachmentsComposite); if (getRepositoryTaskData().getAttachments().size() > 0) { attachmentsTable = toolkit.createTable(attachmentsComposite, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION); attachmentsTable.setLinesVisible(true); attachmentsTable.setHeaderVisible(true); attachmentsTable.setLayout(new GridLayout()); GridData tableGridData = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1); // tableGridData.heightHint = 100; tableGridData.widthHint = DESCRIPTION_WIDTH; attachmentsTable.setLayoutData(tableGridData); for (int i = 0; i < attachmentsColumns.length; i++) { TableColumn column = new TableColumn(attachmentsTable, SWT.LEFT, i); column.setText(attachmentsColumns[i]); column.setWidth(attachmentsColumnWidths[i]); } attachmentsTableViewer = new TableViewer(attachmentsTable); attachmentsTableViewer.setUseHashlookup(true); attachmentsTableViewer.setColumnProperties(attachmentsColumns); final AbstractRepositoryConnector connector = MylarTaskListPlugin.getRepositoryManager() .getRepositoryConnector(getRepositoryTaskData().getRepositoryKind()); if (connector != null) { final IOfflineTaskHandler offlineHandler = connector.getOfflineTaskHandler(); if (offlineHandler != null) { attachmentsTableViewer.setSorter(new ViewerSorter() { public int compare(Viewer viewer, Object e1, Object e2) { RepositoryAttachment attachment1 = (RepositoryAttachment) e1; RepositoryAttachment attachment2 = (RepositoryAttachment) e2; Date created1 = offlineHandler.getDateForAttributeType( RepositoryTaskAttribute.ATTACHMENT_DATE, attachment1.getDateCreated()); Date created2 = offlineHandler.getDateForAttributeType( RepositoryTaskAttribute.ATTACHMENT_DATE, attachment2.getDateCreated()); if (created1 != null && created2 != null) { return attachment1.getDateCreated().compareTo(attachment2.getDateCreated()); } else { return 0; } } }); } } attachmentsTableViewer.setContentProvider(new IStructuredContentProvider() { public Object[] getElements(Object inputElement) { return getRepositoryTaskData().getAttachments().toArray(); } public void dispose() { // ignore } public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { if (!viewer.getControl().isDisposed()) { viewer.refresh(); } } }); attachmentsTableViewer.setLabelProvider(new ITableLabelProvider() { public Image getColumnImage(Object element, int columnIndex) { // RepositoryAttachment attachment = (RepositoryAttachment) // element; return null; } public String getColumnText(Object element, int columnIndex) { RepositoryAttachment attachment = (RepositoryAttachment) element; switch (columnIndex) { case 0: return attachment.getDescription(); case 1: if (attachment.isPatch()) { return "patch"; } else { return attachment.getContentType(); } case 2: return attachment.getCreator(); case 3: return attachment.getDateCreated(); } return "unrecognized column"; } public void addListener(ILabelProviderListener listener) { // ignore } public void dispose() { // ignore } public boolean isLabelProperty(Object element, String property) { // ignore return false; } public void removeListener(ILabelProviderListener listener) { // ignore } }); attachmentsTableViewer.addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { String address = repository.getUrl() + ATTACHMENT_URL_SUFFIX; if (!event.getSelection().isEmpty()) { StructuredSelection selection = (StructuredSelection) event.getSelection(); RepositoryAttachment attachment = (RepositoryAttachment) selection.getFirstElement(); address += attachment.getId() + "&action=view"; ; TaskUiUtil.openUrl(address); } } }); attachmentsTableViewer.setInput(getRepositoryTaskData()); final MenuManager popupMenu = new MenuManager(); popupMenu.add(new Action(LABEL_OPEN_IN_BROWSER) { public void run() { RepositoryAttachment att = (RepositoryAttachment) (((StructuredSelection) attachmentsTableViewer .getSelection()).getFirstElement()); String url = repository.getUrl() + ATTACHMENT_URL_SUFFIX + att.getId(); TaskUiUtil.openUrl(url); } }); popupMenu.add(new Action(SaveRemoteFileAction.TITLE) { public void run() { RepositoryAttachment att = (RepositoryAttachment) (((StructuredSelection) attachmentsTableViewer .getSelection()).getFirstElement()); /* Launch Browser */ FileDialog fileChooser = new FileDialog(attachmentsTable.getShell(), SWT.SAVE); String fname = att.getAttributeValue(ATTR_FILENAME); // Default name if none is found if (fname.equals("")) { String ctype = att.getContentType(); if (ctype.endsWith(CTYPE_HTML)) { fname = ATTACHMENT_DEFAULT_NAME + ".html"; } else if (ctype.startsWith(CTYPE_TEXT)) { fname = ATTACHMENT_DEFAULT_NAME + ".txt"; } else if (ctype.endsWith(CTYPE_OCTET_STREAM)) { fname = ATTACHMENT_DEFAULT_NAME; } else if (ctype.endsWith(CTYPE_ZIP)) { fname = ATTACHMENT_DEFAULT_NAME + "." + CTYPE_ZIP; } else { fname = ATTACHMENT_DEFAULT_NAME + "." + ctype.substring(ctype.indexOf("/") + 1); } } fileChooser.setFileName(fname); String file = fileChooser.open(); // Check if the dialog was canceled or an error occured if (file == null) { return; } SaveRemoteFileAction save = new SaveRemoteFileAction(); save.setDestinationFilePath(file); save.setInputStream(getAttachmentInputStream(repository.getUrl() + ATTACHMENT_URL_SUFFIX + att.getId())); save.run(); } }); final Action copyToClip = new Action(CopyToClipboardAction.TITLE) { public void run() { RepositoryAttachment att = (RepositoryAttachment) (((StructuredSelection) attachmentsTableViewer .getSelection()).getFirstElement()); CopyToClipboardAction copyToClip = new CopyToClipboardAction(); copyToClip.setContents(getAttachmentContents(repository.getUrl() + ATTACHMENT_URL_SUFFIX + att.getId())); copyToClip.setControl(attachmentsTable.getParent()); copyToClip.run(); } }; copyToClip.setId("ID_COPY_TO_CLIPBOARD"); final Action applyPatch = new Action("Apply Patch...") { public void run() { // RepositoryAttachment att = // (RepositoryAttachment)(((StructuredSelection)attachmentsTableViewer.getSelection()).getFirstElement()); // implementation pending bug 98707 } }; applyPatch.setId("ID_APPLY_PATCH"); applyPatch.setEnabled(false); // pending bug 98707 popupMenu.add(new Separator()); Menu menu = popupMenu.createContextMenu(attachmentsTable); attachmentsTable.setMenu(menu); /* * Add the apply patch option if the attachment is a patch. Add the * copy to clipboard option if the attachment is text or xml */ attachmentsTableViewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent e) { RepositoryAttachment att = (RepositoryAttachment) (((StructuredSelection) e.getSelection()) .getFirstElement()); popupMenu.remove("ID_APPLY_PATCH"); popupMenu.remove("ID_COPY_TO_CLIPBOARD"); if (att.getContentType().startsWith(CTYPE_TEXT) || att.getContentType().endsWith("xml")) { popupMenu.add(copyToClip); } if (att.isPatch()) { popupMenu.add(applyPatch); } } }); } else { toolkit.createLabel(attachmentsComposite, "No attachments"); toolkit.createLabel(attachmentsComposite, ""); } /* Launch a NewAttachemntWizard */ Button addAttachmentButton = toolkit.createButton(attachmentsComposite, "Add...", SWT.PUSH); final Text newAttachment = new Text(attachmentsComposite, SWT.LEFT); newAttachment.setEditable(false); newAttachment.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); newAttachment.setBackground(form.getBackground()); addAttachmentButton.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { // ignore } public void widgetSelected(SelectionEvent e) { NewAttachmentWizard naw = new NewAttachmentWizard(); NewAttachmentWizardDialog dialog = new NewAttachmentWizardDialog(attachmentsComposite.getShell(), naw); naw.setDialog(dialog); dialog.create(); dialog.open(); if (dialog.getReturnCode() == WizardDialog.CANCEL) { getRepositoryTaskData().setNewAttachment(null); } else { final LocalAttachment att = naw.getAttachment(); att.setReport(getRepositoryTaskData()); getRepositoryTaskData().setNewAttachment(att); // TODO: Add row to table // RepositoryTaskData data = getRepositoryTaskData(); // data.addAttachment(new DisplayableLocalAttachment(att)); // attachmentsTableViewer.setInput(data); newAttachment.setText((new File(att.getFilePath())).getName() + " <not yet submitted>"); } } }); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/e1cb6f00c856c3bb6007f02de7e3419c8334c46b/AbstractRepositoryTaskEditor.java/clean/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/editors/AbstractRepositoryTaskEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
6803,
3744,
12,
9400,
9635,
13,
288,
202,
202,
5285,
2442,
273,
5226,
8691,
18,
2640,
5285,
12,
27676,
16,
16429,
429,
9400,
18,
14123,
67,
21908,
571,
10092,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
752,
6803,
3744,
12,
9400,
9635,
13,
288,
202,
202,
5285,
2442,
273,
5226,
8691,
18,
2640,
5285,
12,
27676,
16,
16429,
429,
9400,
18,
14123,
67,
21908,
571,
10092,
18,
1... |
if(extendsList != null){ final PsiJavaCodeReferenceElement[] elements = extendsList.getReferenceElements(); for(final PsiJavaCodeReferenceElement element : elements){ final String text = element.getText(); if("Object".equals(text) || "java.lang.Object".equals(text)){ registerError(nameIdentifier); } | if(extendsList == null){ return; } final PsiJavaCodeReferenceElement[] elements = extendsList.getReferenceElements(); for(final PsiJavaCodeReferenceElement element : elements){ final String text = element.getText(); if("Object".equals(text) || "java.lang.Object".equals(text)){ registerError(nameIdentifier); | public void visitTypeParameter(PsiTypeParameter parameter){ super.visitTypeParameter(parameter); final PsiIdentifier nameIdentifier = parameter.getNameIdentifier(); final PsiReferenceList extendsList = parameter.getExtendsList(); if(extendsList != null){ final PsiJavaCodeReferenceElement[] elements = extendsList.getReferenceElements(); for(final PsiJavaCodeReferenceElement element : elements){ final String text = element.getText(); if("Object".equals(text) || "java.lang.Object".equals(text)){ registerError(nameIdentifier); } } } } | 56598 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56598/bfd992e322e7a4460064ead02e35d530f627faec/TypeParameterExtendsObjectInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/verbose/TypeParameterExtendsObjectInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
16920,
12,
52,
7722,
16920,
1569,
15329,
5411,
2240,
18,
11658,
16920,
12,
6775,
1769,
5411,
727,
453,
7722,
3004,
508,
3004,
273,
1569,
18,
17994,
3004,
5621,
5411,
727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
3757,
16920,
12,
52,
7722,
16920,
1569,
15329,
5411,
2240,
18,
11658,
16920,
12,
6775,
1769,
5411,
727,
453,
7722,
3004,
508,
3004,
273,
1569,
18,
17994,
3004,
5621,
5411,
727,
... |
setContentPane(buildContentPane()); | final JPanel panel = new JPanel(new BorderLayout()); panel.add(buildEditorPanel(), BorderLayout.CENTER); panel.add(buildButtonBar(), BorderLayout.SOUTH); panel.setBorder(Borders.DIALOG_BORDER); setContentPane(panel); | private void build() { setContentPane(buildContentPane()); pack(); setResizable(false); setLocationRelativeTo(getOwner()); } | 13936 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13936/398f8633c52268b476c461ff0940da3ca5065521/FoodItemEditorDialog.java/clean/Housekeeper/trunk/housekeeper/src/java/net/sf/housekeeper/swing/FoodItemEditorDialog.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1361,
1435,
565,
288,
3639,
727,
24048,
6594,
273,
394,
24048,
12,
2704,
30814,
10663,
6594,
18,
1289,
12,
3510,
6946,
5537,
9334,
30814,
18,
19835,
1769,
6594,
18,
1289,
12,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1361,
1435,
565,
288,
3639,
727,
24048,
6594,
273,
394,
24048,
12,
2704,
30814,
10663,
6594,
18,
1289,
12,
3510,
6946,
5537,
9334,
30814,
18,
19835,
1769,
6594,
18,
1289,
12,
3... |
State advance = new State( basicBlock, instructionIterator.duplicate(), patternElement.getNext(), 0, currentMatch, bindingSet, true); | State advance = new State(basicBlock, instructionIterator.duplicate(), patternElement.getNext(), 0, currentMatch, bindingSet, true); | public State advanceToNextElement() { if (!canFork || matchCount < patternElement.minOccur()) // Current element is not complete, or we already // forked at this point return null; // Create state to advance to matching next pattern element // at current basic block and instruction. State advance = new State( basicBlock, instructionIterator.duplicate(), patternElement.getNext(), 0, currentMatch, bindingSet, true); // Now that this state has forked from this element // at this instruction, it must not do so again. this.canFork = false; return advance; } | 7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/4748a5a9b76f3dd763ee6bc7755c932a711bd6a6/PatternMatcher.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/bcp/PatternMatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
3287,
8312,
774,
2134,
1046,
1435,
288,
1082,
202,
430,
16051,
4169,
22662,
747,
845,
1380,
411,
1936,
1046,
18,
1154,
12397,
10756,
9506,
202,
759,
6562,
930,
353,
486,
3912,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3196,
202,
482,
3287,
8312,
774,
2134,
1046,
1435,
288,
1082,
202,
430,
16051,
4169,
22662,
747,
845,
1380,
411,
1936,
1046,
18,
1154,
12397,
10756,
9506,
202,
759,
6562,
930,
353,
486,
3912,
... |
public void pack(){ | @Override public void pack(){ | public void pack(){ this.setTitle("wedabecha"); // Hauptmenu in das Fenster einbinden this.setJMenuBar(new MenuBar()); // Listener zum Fensterschliessen per "wegkreuzen" this.addWindowListener(new WindowListener() { public void windowClosing(WindowEvent event) { wedabecha.QuitProgram(); } // windowClosing(WindowEvent event) public void windowOpened(WindowEvent arg0) { // TODO Auto-generated method stub } public void windowClosed(WindowEvent arg0) { // TODO Auto-generated method stub } public void windowIconified(WindowEvent arg0) { // TODO Auto-generated method stub } public void windowDeiconified(WindowEvent arg0) { // TODO Auto-generated method stub } public void windowActivated(WindowEvent arg0) { // TODO Auto-generated method stub } public void windowDeactivated(WindowEvent arg0) { // TODO Auto-generated method stub } }); // beendenListener int screenWidth = getToolkit().getScreenSize().width; int screenHeight = getToolkit().getScreenSize().height; int Xposition = (screenWidth - windowWidth) / 2; int Yposition = (screenHeight - windowHeight) / 2; this.setSize(windowWidth,windowHeight); this.setContentPane(mainPane); mainPane.add(toolbarPane, JLayeredPane.PALETTE_LAYER); mainPane.add(layeredPane, JLayeredPane.DEFAULT_LAYER); mainPane.setSize(windowWidth,windowHeight); mainPane.setVisible(true); // JLayeredPane wird als neue ContentPane eingesetzt layeredPane.setOpaque(true); // ContentPane muss durchsichtig sein// toolbarPane.setSize(this.fensterBreite,35); mainPane.add(this.startDateLabel, new Integer(510)); this.startDateLabel.setSize(100,20); this.startDateLabel.setLocation(new Point(windowWidth - 340, 35)); mainPane.add(this.startDateSpinner, new Integer(510)); this.startDateSpinner.setSize(70,20); this.startDateSpinner.setLocation(new Point(windowWidth - 250, 35)); this.startDateSpinner.setValue(new Integer(1)); this.startDateSpinner.addChangeListener(new ChangeListener(){ public void stateChanged(ChangeEvent event){ if(((Integer)startDateSpinner.getValue()).intValue() <= 0){ startDateSpinner.setValue(new Integer(1)); } // if() endDateSpinner.setValue(new Integer( ((Integer)startDateSpinner.getValue()).intValue() + 299)); for (int i = 1; i < 6; i++){ if (wedabecha.getCurve(i).isset()){ if (wedabecha.getCurve(i).getStyleIndex() == 0){ wedabecha.getCurve(i).getShareCurve().dateBeginIndex = ((Integer)startDateSpinner.getValue()).intValue(); wedabecha.getCurve(i).getShareCurve().dateEndIndex = ((Integer)endDateSpinner.getValue()).intValue(); } else { wedabecha.getCurve(i).getLineCurve().dateBeginIndex = ((Integer)startDateSpinner.getValue()).intValue(); wedabecha.getCurve(i).getLineCurve().dateEndIndex = ((Integer)endDateSpinner.getValue()).intValue(); } // if coords.setStartDateIndex( ((Integer)startDateSpinner.getValue()).intValue() ); coords.setEndDateIndex( ((Integer)endDateSpinner.getValue()).intValue() ); } // if } // for } }); mainPane.add(this.endDateLabel, new Integer(510)); this.endDateLabel.setSize(100,20); this.endDateLabel.setLocation(new Point(windowWidth - 170,35)); mainPane.add(this.endDateSpinner, new Integer(510)); this.endDateSpinner.setSize(70,20); this.endDateSpinner.setLocation(new Point(windowWidth - 80,35)); this.endDateSpinner.setValue(new Integer(300)); this.endDateSpinner.addChangeListener(new ChangeListener(){ public void stateChanged(ChangeEvent event){ startDateSpinner.setValue(new Integer( ((Integer)endDateSpinner.getValue()).intValue() - 299)); if ( ((Integer)endDateSpinner.getValue()).intValue() >= maxDate){ endDateSpinner.setValue(new Integer(maxDate)); } layeredPane.repaint(); } }); layeredPane.setSize(windowWidth,windowHeight); layeredPane.setVisible(true); // Raster der neuen ContentPane adden MainWindow.layeredPane.add(zeichneRaster, new Integer(0)); // Koordinatensystem der neuen ContentPane adden MainWindow.layeredPane.add(coords, new Integer(1)); // Werkzeugleiste einbinden MainWindow.mainPane.add(toolBar.getToolBar(), JLayeredPane.PALETTE_LAYER); this.setLocation(Xposition,Yposition); //this.setMinimumSize(new Dimension(this.fensterBreite,this.fensterHoehe)); this.setResizable(false); this.setVisible(true); /* für den Fall das irgendwann mal ein Kontextmenü gebraucht wird dann is das hier schon hinzugefügt */// hauptFensterUI.layeredPane.add(kontext.getKontextMenu(), JLayeredPane.POPUP_LAYER);// hauptFensterUI.layeredPane.addMouseListener(new MouseAdapter() {// public void mouseReleased(MouseEvent me ) {// if ( me.getButton() == MouseEvent.BUTTON3) {// kontext.getKontextMenu().show( layeredPane, me.getX(), me.getY() );// } // if()// } // mouseReleased(MouseEvent me)// } ); // addMouseListener() // dieser MouseListener sorgt dafür, dass die Textfelder dem Hauptfenster hinzugefügt werden können MainWindow.layeredPane.addMouseListener(new MouseAdapter(){ public void mouseReleased(MouseEvent me) { // wenn der ToggleButton in der Toolbar aktiviert ist... if(toolBar.textGewaehlt()){ // ...reagiert erst der MouseListener auf den Linksklick if(me.getButton() == MouseEvent.BUTTON1){ String text = JOptionPane.showInputDialog(null, "Bitte den darzustellenden Text eingeben", "neues Textfeld erstellen.", JOptionPane.QUESTION_MESSAGE); if(text != null){ Text zeichneText = new Text(text, me.getX(), me.getY()); layeredPane.add(zeichneText, new Integer(9));// System.out.println(text); }// if }// if }// if }// mouseReleased(MouseEvent me) }// MouseAdapter );// addMouseListener() //dieser MouseListener sorgt dafür, dass die Linien im Hauptfenster gezeichnet werden können MainWindow.layeredPane.addMouseListener(new MouseAdapter(){ private int startX; private int endX; private int startY; private int endY; private int zaehler; // legt die koordinaten für start- und endpunkte fest public void mouseReleased(MouseEvent me) { // wenn der ToggleButton in der Toolbar aktiviert ist... if(toolBar.linieGewaehlt()){ // ...reagiert erst der MouseListener auf den Linksklick if(me.getButton() == MouseEvent.BUTTON1){ /* beim ersten klick werden die Startwerte gesetzt, beim zweiten die endwerte */ switch(this.zaehler){ case 0: this.startX = me.getX(); this.startY = me.getY(); this.zaehler = 1; break; case 1: this.endX = me.getX(); this.endY = me.getY(); this.zaehler = 0; /* mit den so gewonnenen werten wird dann die linie gezeichnet und der leyeredPane geadded */ Line zeichneLinie = new Line (this.startX, this.startY, this.endX, this.endY); layeredPane.add(zeichneLinie, new Integer(8)); this.startX = this.startY = this.endX = this.endY = 0; break; }// switch(zaehler) }// if() }// if() }// mouseReleased(MouseEvent me) }// MouseAdapter );// addMouseListener() // dieser MouseListener sorgt dafür, dass die Pfeile im Hauptfenster gezeichnet werden können MainWindow.layeredPane.addMouseListener(new MouseAdapter(){ private int startX = 0; private int endX = 0; private int startY = 0; private int endY = 0; private int zaehler; // legt die koordinaten für start- und endpunkte fest public void mouseReleased(MouseEvent me) { // wenn der JToggleButton in der Toolbar aktiviert ist... if(toolBar.pfeilGewaehlt()){ // ...reagiert erst der MouseListener auf den Linksklick if(me.getButton() == MouseEvent.BUTTON1){ /* beim ersten klick werden die Startwerte gesetzt, beim zweiten die endwerte */ switch(this.zaehler){ case 0: this.startX = me.getX(); this.startY = me.getY(); this.zaehler = 1; break; case 1: this.endX = me.getX(); this.endY = me.getY(); this.zaehler = 0; /* mit den so gewonnenen werten wird dann die linie gezeichnet und der leyeredPane geadded */ Arrow zeichnePfeil = new Arrow(this.startX, this.startY, this.endX, this.endY); layeredPane.add(zeichnePfeil, new Integer(7)); break; }// switch(zaehler) }// if() }// if() }// mouseReleased(MouseEvent me) }// MouseAdapter );// addMouseListener() // Klasse zur dynamischen Größenbestimmung des Frames MainWindow.mainPane.addComponentListener(new ComponentAdapter(){ public void componentResized(ComponentEvent event){ if(event.getID() == ComponentEvent.COMPONENT_RESIZED){ JLayeredPane layeredPane = (JLayeredPane) event.getComponent(); d = layeredPane.getSize(); zeichneRaster.setGroesse(d.width, d.height); MainWindow.setGroesse(d.width, d.height); coords.setGroesse(d.width, d.height); startDateSpinner.setLocation(new Point(d.width - 250,35)); startDateLabel.setLocation(new Point(d.width - 340,35)); endDateLabel.setLocation(new Point(d.width - 170,35)); endDateSpinner.setLocation(new Point(d.width - 80,35)); for(int i = 1; i <= 5; i++){ if(wedabecha.getCurve(i).isset()){ if(wedabecha.getCurve(i).getStyleIndex() == 0){ wedabecha.getCurve(i).getShareCurve().setGroesse(d.width, d.height); }else{ wedabecha.getCurve(i).getLineCurve().setGroesse(d.width, d.height); }// if-else() } // if() } // for toolBar.setBreite(d.width); toolbarPane.setSize(d.width, 35); System.out.println(d); } // if } // componentResized() }); // addComponentListener() } // pack() | 13459 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13459/b4e20db986e9a4a6a1fc26eb7a1b9a3c8bdbc340/MainWindow.java/buggy/trunk/src/de/codeforum/wedabecha/ui/MainWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2298,
1435,
95,
202,
202,
2211,
18,
542,
4247,
2932,
91,
329,
378,
73,
8838,
8863,
202,
202,
759,
670,
69,
3648,
5414,
316,
30255,
478,
275,
8190,
16315,
4376,
275,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
2298,
1435,
95,
202,
202,
2211,
18,
542,
4247,
2932,
91,
329,
378,
73,
8838,
8863,
202,
202,
759,
670,
69,
3648,
5414,
316,
30255,
478,
275,
8190,
16315,
4376,
275,
202,
... |
if (i+1 < args.length) { | if (i+1 < args.length) { | private static void handleArgs(String[] args, int startOffset, String[] base) { for (int i = startOffset; i < args.length; i++) { try { if ("-exit".equals(args[i])) { println("Exit.", 0); System.exit(0); } else if ("-init".equals(args[i])) { // This is done in an earlier pass, otherwise we // shoot the FW in the foot } else if ("-version".equals(args[i])) { printResource("/tstamp"); printResource("/revision"); System.exit(0); } else if ("-help".equals(args[i])) { printResource("/help.txt"); System.exit(0); } else if ("-readme".equals(args[i])) { printResource("/readme.txt"); System.exit(0); } else if ("-jvminfo".equals(args[i])) { printJVMInfo(); System.exit(0); } else if ("-install".equals(args[i])) { if (i+1 < args.length) { String bundle = args[i+1]; long id = framework.installBundle(completeLocation(base,bundle), null); println("Installed: " + framework.getBundleLocation(id) + " (id#" + id + ")", 0); i++; } else { error("No URL for install command"); } } else if ("-istart".equals(args[i])) { if (i+1 < args.length) { String bundle = args[i+1]; long id = framework.installBundle(completeLocation(base,bundle), null); framework.startBundle(id); println("Installed and started: " + framework.getBundleLocation(id) + " (id#" + id + ")", 0); i++; } else { error("No URL for install command"); } } else if ("-launch".equals(args[i])) { if (i+1 < args.length && !args[i+1].startsWith("-")) { bootMgr = Long.parseLong(args[i+1]); framework.launch(bootMgr); i++; } else { framework.launch(0); } println("Framework launched", 0); } else if ("-shutdown".equals(args[i])) { framework.shutdown(); println("Framework shutdown", 0); } else if ("-sleep".equals(args[i])) { if (i+1 < args.length) { long t = Long.parseLong(args[i+1]); try { println("Sleeping...", 0); Thread.sleep(t * 1000); } catch (InterruptedException e) { error("Sleep interrupted."); } i++; } else { error("No time for sleep command"); } } else if ("-start".equals(args[i])) { if (i+1 < args.length) { long id = getBundleID(base,args[i+1]); framework.startBundle(id); println("Started: " + framework.getBundleLocation(id) + " (id#" + id + ")", 0); i++; } else { error("No ID for start command"); } } else if ("-stop".equals(args[i])) { if (i+1 < args.length) { long id = getBundleID(base,args[i+1]); framework.stopBundle(id); println("Stopped: " + framework.getBundleLocation(id) + " (id#" + id + ")", 0); i++; } else { error("No ID for stop command"); } } else if ("-uninstall".equals(args[i])) { if (i+1 < args.length) { long id = getBundleID(base,args[i+1]); String loc = framework.getBundleLocation(id); framework.uninstallBundle(id); println("Uninstalled: " + loc + " (id#" + id + ")", 0); i++; } else { error("No id for uninstall command"); } } else if ("-update".equals(args[i])) { if (i+1 < args.length) { long[] ids = null; if("ALL".equals(args[i+1])) { Bundle[] bl = framework.getSystemBundleContext().getBundles(); ids = new long[bl.length]; for(int n = 0; n < bl.length; n++) { ids[n] = bl[n].getBundleId(); } } else { ids = new long[] { getBundleID(base,args[i+1]) }; } for(int n = 0; n < ids.length; n++) { long id = ids[n]; if(id != 0) { framework.updateBundle(id); println("Updated: " + framework.getBundleLocation(id) + " (id#" + id + ")", 0); } } i++; } else { error("No id for update command"); } } else if ("-initlevel".equals(args[i])) { if (i+1 < args.length) { int n = Integer.parseInt(args[i+1]); if(framework.startLevelService != null) { framework.startLevelService.setInitialBundleStartLevel(n); } else { println("No start level service - ignoring init bundle level " + n, 0); } i++; } else { error("No integer level for initlevel command"); } } else if ("-startlevel".equals(args[i])) { if (i+1 < args.length) { int n = Integer.parseInt(args[i+1]); if(framework.startLevelService != null) { if(n == 1) { if(Debug.startlevel) { Debug.println("Entering startlevel compatibility mode, all bundles will have startlevel == 1"); } framework.startLevelService.bCompat = true; } framework.startLevelService.setStartLevel(n); } else { println("No start level service - ignoring start level " + n, 0); } i++; } else { error("No integer level for startlevel command"); } } else { error("Unknown option: " + args[i] + "\nUse option -help to see all options"); } } catch (BundleException e) { Throwable ne = e.getNestedException(); if (ne != null) { e.getNestedException().printStackTrace(System.err); } else { e.printStackTrace(System.err); } error("Command \"" + args[i] + ((i+1 < args.length && !args[i+1].startsWith("-")) ? " " + args[i+1] : "") + "\" failed, " + e.getMessage()); } catch (Exception e) { e.printStackTrace(System.err); error("Command \"" + args[i] + ((i+1 < args.length && !args[i+1].startsWith("-")) ? " " + args[i+1] : "") + "\" failed, " + e.getMessage()); } } if (!framework.active) { try { framework.launch(0); println("Framework launched", 0); } catch (Throwable t) { if (t instanceof BundleException) { BundleException be = (BundleException) t; Throwable ne = be.getNestedException(); if (ne != null) t = ne; } t.printStackTrace(System.err); error("Framework launch failed, " + t.getMessage()); } } } | 13251 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13251/17ae88b3f7b2b6dd3c0f3c451b2a40ec7c30404f/Main.java/buggy/osgi/framework/src/org/knopflerfish/framework/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1640,
2615,
12,
780,
8526,
833,
16,
21394,
509,
18245,
16,
4766,
514,
8526,
1026,
13,
288,
565,
364,
261,
474,
277,
273,
18245,
31,
277,
411,
833,
18,
2469,
31,
277,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
760,
918,
1640,
2615,
12,
780,
8526,
833,
16,
21394,
509,
18245,
16,
4766,
514,
8526,
1026,
13,
288,
565,
364,
261,
474,
277,
273,
18245,
31,
277,
411,
833,
18,
2469,
31,
277,
2... |
.create()); | .create('R')); | private void setupCLI() { opts = new Options(); // boolean options opts.addOption("h", "help", false, "Print this message."); opts.addOption("a", "verify", false, "verify generated signatures>"); opts.addOption("F", "fully-sign-keyset", false, "sign the zone apex keyset with all available keys."); // Argument options opts.addOption(OptionBuilder.hasOptionalArg().withLongOpt("verbose") .withArgName("level").withDescription("verbosity level") .create('v')); opts.addOption(OptionBuilder.hasArg().withArgName("dir") .withLongOpt("keyset-directory") .withDescription("directory to find keyset files (default '.').") .create('d')); opts.addOption(OptionBuilder.hasArg().withArgName("dir") .withLongOpt("key-directory") .withDescription("directory to find key files (default '.').") .create('D')); opts.addOption(OptionBuilder.hasArg().withArgName("time/offset") .withLongOpt("start-time") .withDescription("signature starting time " + "(default is now - 1 hour)").create('s')); opts.addOption(OptionBuilder.hasArg().withArgName("time/offset") .withLongOpt("expire-time") .withDescription("signature expiration time " + "(default is start-time + 30 days).").create('e')); opts.addOption(OptionBuilder.hasArg().withArgName("outfile") .withDescription("file the signed zone is written to " + "(default is <origin>.signed).").create('f')); opts.addOption(OptionBuilder.hasArgs().withArgName("KSK file") .withLongOpt("ksk-file").withDescription("this key is a key " + "signing key (may repeat).").create('k')); opts.addOption(OptionBuilder.hasArg().withArgName("file") .withLongOpt("include-file") .withDescription("include names in this " + "file in the NSEC/NSEC3 chain.").create('I')); // NSEC3 options opts.addOption("3", "use-nsec3", false, "use NSEC3 instead of NSEC"); opts.addOption("O", "use-opt-in", false, "generate a fully Opt-In zone."); opts.addOption(OptionBuilder.hasArg().withLongOpt("salt") .withArgName("hex value").withDescription("supply a salt value.") .create()); opts.addOption(OptionBuilder.hasArg().withLongOpt("random-salt") .withArgName("length").withDescription("generate a random salt.") .create()); opts.addOption(OptionBuilder.hasArg().withLongOpt("iterations") .withArgName("value") .withDescription("use this value for the iterations in NSEC3.") .create()); } | 52634 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52634/1f08b8abb8cb378c27fc575478a5ff749465594a/SignZone.java/buggy/src/com/verisignlabs/dnssec/cl/SignZone.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3875,
7697,
1435,
565,
288,
1377,
1500,
273,
394,
5087,
5621,
1377,
368,
1250,
702,
1377,
1500,
18,
1289,
1895,
2932,
76,
3113,
315,
5201,
3113,
629,
16,
315,
5108,
333,
883,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
3875,
7697,
1435,
565,
288,
1377,
1500,
273,
394,
5087,
5621,
1377,
368,
1250,
702,
1377,
1500,
18,
1289,
1895,
2932,
76,
3113,
315,
5201,
3113,
629,
16,
315,
5108,
333,
883,
... |
BorderInfo bi = (BorderInfo) super.clone(); bi.mWidth = (ResolvedCondLength)mWidth.clone(); return bi; } | BorderInfo bi = (BorderInfo) super.clone(); bi.mWidth = (ResolvedCondLength) mWidth.clone(); return bi; } | public Object clone() throws CloneNotSupportedException { BorderInfo bi = (BorderInfo) super.clone(); bi.mWidth = (ResolvedCondLength)mWidth.clone(); // do we need to clone the Color too??? return bi; } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/392781f30969e4da0b510da16b96099a320089ba/BorderAndPadding.java/buggy/src/org/apache/fop/layout/BorderAndPadding.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
3236,
1435,
1216,
12758,
25482,
288,
202,
565,
13525,
966,
10054,
273,
261,
8107,
966,
13,
2240,
18,
14056,
5621,
202,
565,
10054,
18,
81,
2384,
273,
261,
12793,
12441,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
3236,
1435,
1216,
12758,
25482,
288,
202,
565,
13525,
966,
10054,
273,
261,
8107,
966,
13,
2240,
18,
14056,
5621,
202,
565,
10054,
18,
81,
2384,
273,
261,
12793,
12441,
17... |
{ FormatInfo fi = FormatInfo.valueOf("45"); FormatInfo witness = new FormatInfo(); witness.setMin(45); assertEquals(witness, fi); } | { FormatInfo fi = FormatInfo.valueOf("45"); FormatInfo witness = new FormatInfo(); witness.setMin(45); assertEquals(witness, fi); } | public void testBasic() { { FormatInfo fi = FormatInfo.valueOf("45"); FormatInfo witness = new FormatInfo(); witness.setMin(45); assertEquals(witness, fi); } { FormatInfo fi = FormatInfo.valueOf("4.5"); FormatInfo witness = new FormatInfo(); witness.setMin(4); witness.setMax(5); assertEquals(witness, fi); } } | 50185 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50185/db1e638eac0842539158df58ff0840001d2bb23d/FormatInfoTest.java/buggy/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/FormatInfoTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
8252,
1435,
288,
202,
202,
95,
1082,
202,
1630,
966,
7314,
273,
4077,
966,
18,
1132,
951,
2932,
7950,
8863,
1082,
202,
1630,
966,
15628,
273,
394,
4077,
966,
5621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
8252,
1435,
288,
202,
202,
95,
1082,
202,
1630,
966,
7314,
273,
4077,
966,
18,
1132,
951,
2932,
7950,
8863,
1082,
202,
1630,
966,
15628,
273,
394,
4077,
966,
5621,
... |
public int getWaitingThread() { | public int getWaitingThread() { | public int getWaitingThread() { return _threadPool.getIdleThreads(); } | 13242 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13242/eec0e44eb9cc4955b7fac0873919da0c3da6a577/JettyPipeline.java/buggy/extras/grizzly/src/main/java/org/mortbay/jetty/grizzly/JettyPipeline.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
336,
15946,
3830,
1435,
288,
4202,
327,
225,
389,
5930,
2864,
18,
588,
13834,
13233,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
336,
15946,
3830,
1435,
288,
4202,
327,
225,
389,
5930,
2864,
18,
588,
13834,
13233,
5621,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public AttributeDescr no_loop() throws RecognitionException { AttributeDescr d; Token loc=null; Token t=null; d = null; try { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:448:17: ( (loc= 'no-loop' opt_eol ( ';' )? opt_eol ) | (loc= 'no-loop' t= BOOL opt_eol ( ';' )? opt_eol ) ) int alt33=2; int LA33_0 = input.LA(1); if ( LA33_0==34 ) { int LA33_1 = input.LA(2); if ( LA33_1==BOOL ) { alt33=2; } else if ( LA33_1==EOL||LA33_1==15||LA33_1==22||LA33_1==27||LA33_1==29||LA33_1==31||(LA33_1>=33 && LA33_1<=38) ) { alt33=1; } else { NoViableAltException nvae = new NoViableAltException("443:1: no_loop returns [AttributeDescr d] : ( (loc= \'no-loop\' opt_eol ( \';\' )? opt_eol ) | (loc= \'no-loop\' t= BOOL opt_eol ( \';\' )? opt_eol ) );", 33, 1, input); throw nvae; } } else { NoViableAltException nvae = new NoViableAltException("443:1: no_loop returns [AttributeDescr d] : ( (loc= \'no-loop\' opt_eol ( \';\' )? opt_eol ) | (loc= \'no-loop\' t= BOOL opt_eol ( \';\' )? opt_eol ) );", 33, 0, input); throw nvae; } switch (alt33) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:448:17: (loc= 'no-loop' opt_eol ( ';' )? opt_eol ) { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:448:17: (loc= 'no-loop' opt_eol ( ';' )? opt_eol ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:449:25: loc= 'no-loop' opt_eol ( ';' )? opt_eol { loc=(Token)input.LT(1); match(input,34,FOLLOW_34_in_no_loop946); following.push(FOLLOW_opt_eol_in_no_loop948); opt_eol(); following.pop(); // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:449:47: ( ';' )? int alt31=2; int LA31_0 = input.LA(1); if ( LA31_0==15 ) { alt31=1; } else if ( LA31_0==EOL||LA31_0==22||LA31_0==27||LA31_0==29||LA31_0==31||(LA31_0>=33 && LA31_0<=38) ) { alt31=2; } else { NoViableAltException nvae = new NoViableAltException("449:47: ( \';\' )?", 31, 0, input); throw nvae; } switch (alt31) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:449:47: ';' { match(input,15,FOLLOW_15_in_no_loop950); } break; } following.push(FOLLOW_opt_eol_in_no_loop953); opt_eol(); following.pop(); d = new AttributeDescr( "no-loop", "true" ); d.setLocation( loc.getLine(), loc.getCharPositionInLine() ); } } break; case 2 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:456:17: (loc= 'no-loop' t= BOOL opt_eol ( ';' )? opt_eol ) { // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:456:17: (loc= 'no-loop' t= BOOL opt_eol ( ';' )? opt_eol ) // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:457:25: loc= 'no-loop' t= BOOL opt_eol ( ';' )? opt_eol { loc=(Token)input.LT(1); match(input,34,FOLLOW_34_in_no_loop978); t=(Token)input.LT(1); match(input,BOOL,FOLLOW_BOOL_in_no_loop982); following.push(FOLLOW_opt_eol_in_no_loop984); opt_eol(); following.pop(); // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:457:54: ( ';' )? int alt32=2; int LA32_0 = input.LA(1); if ( LA32_0==15 ) { alt32=1; } else if ( LA32_0==EOL||LA32_0==22||LA32_0==27||LA32_0==29||LA32_0==31||(LA32_0>=33 && LA32_0<=38) ) { alt32=2; } else { NoViableAltException nvae = new NoViableAltException("457:54: ( \';\' )?", 32, 0, input); throw nvae; } switch (alt32) { case 1 : // C:\Projects\jboss-rules-new\drools-compiler\src\main\resources\org\drools\lang\drl.g:457:54: ';' { match(input,15,FOLLOW_15_in_no_loop986); } break; } following.push(FOLLOW_opt_eol_in_no_loop989); opt_eol(); following.pop(); d = new AttributeDescr( "no-loop", t.getText() ); d.setLocation( loc.getLine(), loc.getCharPositionInLine() ); } } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/297a1e0ef2967d8b4f7be9c022102a5a56e97489/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3601,
16198,
1158,
67,
6498,
1435,
1216,
9539,
288,
6647,
3601,
16198,
302,
31,
3639,
3155,
1515,
33,
2011,
31,
3639,
3155,
268,
33,
2011,
31,
1171,
202,
202,
72,
273,
446,
31,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3601,
16198,
1158,
67,
6498,
1435,
1216,
9539,
288,
6647,
3601,
16198,
302,
31,
3639,
3155,
1515,
33,
2011,
31,
3639,
3155,
268,
33,
2011,
31,
1171,
202,
202,
72,
273,
446,
31,
54... | ||
public void setGroup(org.openmicroscopy.omero.model.Group group) { | public void setGroup(Group group) { | public void setGroup(org.openmicroscopy.omero.model.Group group) { this.group = group; } | 54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/9570ef74198a070d72e77c417c9d25244a942de2/ImageInfo.java/clean/components/common/src/org/openmicroscopy/omero/model/ImageInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
1114,
12,
1114,
1041,
13,
288,
3639,
333,
18,
1655,
273,
1041,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
444,
1114,
12,
1114,
1041,
13,
288,
3639,
333,
18,
1655,
273,
1041,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public OccupationPeriod(Date startDate, Date endDate) { this(); this.setStart(startDate); this.setEnd(endDate); | public OccupationPeriod() { super(); setRootDomainObject(RootDomainObject.getInstance()); | public OccupationPeriod(Date startDate, Date endDate) { this(); this.setStart(startDate); this.setEnd(endDate); } | 2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/8d87e84dbb49aeb643ba718d3a02de6c4edf7063/OccupationPeriod.java/buggy/src/net/sourceforge/fenixedu/domain/OccupationPeriod.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
531,
952,
416,
367,
5027,
12,
1626,
12572,
16,
2167,
13202,
13,
288,
377,
202,
2211,
5621,
3639,
333,
18,
542,
1685,
12,
1937,
1626,
1769,
3639,
333,
18,
542,
1638,
12,
409,
1626,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
531,
952,
416,
367,
5027,
12,
1626,
12572,
16,
2167,
13202,
13,
288,
377,
202,
2211,
5621,
3639,
333,
18,
542,
1685,
12,
1937,
1626,
1769,
3639,
333,
18,
542,
1638,
12,
409,
1626,... |
System.out.println("session found and closing down " + index); | log.info("session found and closing down " + index); | public void removeSessionView(Session targetSession) { if (hideTabBar && sessionPane.getTabCount() == 0) { for (int x=0; x < getContentPane().getComponentCount(); x++) { if (getContentPane().getComponent(x) instanceof Session) { getContentPane().remove(x); } } } else { int index = sessionPane.indexOfComponent(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this); int tabs = sessionPane.getTabCount(); sessionPane.remove(index); tabs--; if (index < tabs) { sessionPane.setSelectedIndex(index); sessionPane.setForegroundAt(index,Color.blue); sessionPane.setIconAt(index,focused); ((Session)sessionPane.getComponentAt(index)).requestFocus(); } else { if (tabs > 0) { sessionPane.setSelectedIndex(0); sessionPane.setForegroundAt(0,Color.blue); sessionPane.setIconAt(0,focused); ((Session)sessionPane.getComponentAt(0)).requestFocus(); } } } } | 1179 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1179/379255347f37d0432228baaff23d41ccb4ad68bd/Gui5250Frame.java/clean/tn5250j/src/org/tn5250j/Gui5250Frame.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1206,
2157,
1767,
12,
2157,
1018,
2157,
13,
288,
1377,
309,
261,
11248,
5661,
5190,
597,
1339,
8485,
18,
588,
5661,
1380,
1435,
422,
374,
13,
288,
540,
364,
261,
474,
619,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
918,
1206,
2157,
1767,
12,
2157,
1018,
2157,
13,
288,
1377,
309,
261,
11248,
5661,
5190,
597,
1339,
8485,
18,
588,
5661,
1380,
1435,
422,
374,
13,
288,
540,
364,
261,
474,
619,
33... |
if(!(value instanceof QName)) return null; boolean result; QName q = (QName)value; if (uri == null) { result = q.uri == null && localName.equals(q.localName); } else { result = uri.equals(q.uri) && localName.equals(q.localName); } | if(!(value instanceof QName)) return Scriptable.NOT_FOUND; boolean result = equals((QName)value); | public Boolean equivalentValues(Object value) { if(!(value instanceof QName)) return null; boolean result; QName q = (QName)value; if (uri == null) { result = q.uri == null && localName.equals(q.localName); } else { result = uri.equals(q.uri) && localName.equals(q.localName); } return result ? Boolean.TRUE : Boolean.FALSE; } | 51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/e056c6cd398e14bb613713e0d2422d282617403a/QName.java/clean/js/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3411,
7680,
1972,
12,
921,
460,
13,
565,
288,
3639,
309,
12,
5,
12,
1132,
1276,
16723,
3719,
327,
446,
31,
3639,
1250,
563,
31,
3639,
16723,
1043,
273,
261,
13688,
13,
1132,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
3411,
7680,
1972,
12,
921,
460,
13,
565,
288,
3639,
309,
12,
5,
12,
1132,
1276,
16723,
3719,
327,
446,
31,
3639,
1250,
563,
31,
3639,
16723,
1043,
273,
261,
13688,
13,
1132,
31,
... |
streamOutput.pushChar ('\n'); | output.pushChar ('\n'); | public void work() { streamOutput.pushChar(message.charAt(i)); i++; if (message.length () == i) { i = 0; streamOutput.pushChar ('\n'); } } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/a97ca875e1744ac20c2392ec0afd90513685e318/CharGenerator.java/clean/streams/apps/tests/hello-message/CharGenerator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1440,
1435,
565,
288,
3639,
1407,
1447,
18,
6206,
2156,
12,
2150,
18,
3001,
861,
12,
77,
10019,
3639,
277,
9904,
31,
3639,
309,
261,
2150,
18,
2469,
1832,
422,
277,
13,
3639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1440,
1435,
565,
288,
3639,
1407,
1447,
18,
6206,
2156,
12,
2150,
18,
3001,
861,
12,
77,
10019,
3639,
277,
9904,
31,
3639,
309,
261,
2150,
18,
2469,
1832,
422,
277,
13,
3639,... |
private void initButtonPanel() { addButton = new JButton("Add"); deleteButton = new JButton("Remove"); saveButton = new JButton("Apply"); reviewButton = new JCheckBox("Reviewed"); previousButton = new JButton("Previous"); nextButton = new JButton("Next"); reviewButton.setSelected(((ReviewableUMLNode)node).isReviewed()); addButton.setActionCommand(ADD); deleteButton.setActionCommand(DELETE); saveButton.setActionCommand(SAVE); previousButton.setActionCommand(PREVIOUS); nextButton.setActionCommand(NEXT); addButton.addActionListener(this); deleteButton.addActionListener(this); saveButton.addActionListener(this); reviewButton.addItemListener(this); previousButton.addActionListener(this); nextButton.addActionListener(this); if(concepts.length < 2) deleteButton.setEnabled(false); setSaveButtonState(false); setButtonState(reviewButton); JPanel buttonPanel = new JPanel(); buttonPanel.add(addButton); buttonPanel.add(deleteButton); buttonPanel.add(saveButton); buttonPanel.add(reviewButton); buttonPanel.add(previousButton); buttonPanel.add(nextButton); | private void initButtonPanel() { addButton = new JButton("Add"); deleteButton = new JButton("Remove"); saveButton = new JButton("Apply"); reviewButton = new JCheckBox("Reviewed"); previousButton = new JButton("Previous"); nextButton = new JButton("Next"); reviewButton.setSelected(((ReviewableUMLNode)node).isReviewed()); addButton.setActionCommand(ADD); deleteButton.setActionCommand(DELETE); saveButton.setActionCommand(SAVE); previousButton.setActionCommand(PREVIOUS); nextButton.setActionCommand(NEXT); addButton.addActionListener(this); deleteButton.addActionListener(this); saveButton.addActionListener(this); reviewButton.addItemListener(this); previousButton.addActionListener(this); nextButton.addActionListener(this); if(concepts.length < 2) deleteButton.setEnabled(false); if(areAllFieldEntered()) { reviewButton.setEnabled(true); addButton.setEnabled(true); } else { addButton.setEnabled(false); reviewButton.setEnabled(false); } saveButton.setEnabled(false); | private void initButtonPanel() { addButton = new JButton("Add"); deleteButton = new JButton("Remove"); saveButton = new JButton("Apply"); reviewButton = new JCheckBox("Reviewed"); previousButton = new JButton("Previous"); nextButton = new JButton("Next"); reviewButton.setSelected(((ReviewableUMLNode)node).isReviewed()); addButton.setActionCommand(ADD); deleteButton.setActionCommand(DELETE); saveButton.setActionCommand(SAVE); previousButton.setActionCommand(PREVIOUS); nextButton.setActionCommand(NEXT); addButton.addActionListener(this); deleteButton.addActionListener(this); saveButton.addActionListener(this); reviewButton.addItemListener(this); previousButton.addActionListener(this); nextButton.addActionListener(this); if(concepts.length < 2) deleteButton.setEnabled(false); setSaveButtonState(false); setButtonState(reviewButton); JPanel buttonPanel = new JPanel(); buttonPanel.add(addButton); buttonPanel.add(deleteButton); buttonPanel.add(saveButton); buttonPanel.add(reviewButton); buttonPanel.add(previousButton); buttonPanel.add(nextButton); this.add(buttonPanel, BorderLayout.SOUTH); } | 55019 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55019/082099ce0c2115d77c065a36b46e6a14dbbbbc14/UMLElementViewPanel.java/clean/src/gov/nih/nci/ncicb/cadsr/loader/ui/UMLElementViewPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1208,
3616,
5537,
1435,
225,
288,
282,
202,
1289,
3616,
273,
394,
28804,
2932,
986,
8863,
282,
202,
3733,
3616,
273,
394,
28804,
2932,
3288,
8863,
282,
202,
5688,
3616,
273,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
1208,
3616,
5537,
1435,
225,
288,
282,
202,
1289,
3616,
273,
394,
28804,
2932,
986,
8863,
282,
202,
3733,
3616,
273,
394,
28804,
2932,
3288,
8863,
282,
202,
5688,
3616,
273,
39... |
IWorkbenchAction action = new QuitAction(window); action.setId(getId()); | RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_properties); action.setToolTipText(WorkbenchMessages.Workbench_propertiesToolTip); window.getPartService().addPartListener(action); action.setActionDefinitionId("org.eclipse.ui.file.properties"); | public IWorkbenchAction create(IWorkbenchWindow window) { if (window == null) { throw new IllegalArgumentException(); } IWorkbenchAction action = new QuitAction(window); action.setId(getId()); return action; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/dde25e2c5d25803300d3e725ba305dd0140f61ea/ActionFactory.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
467,
2421,
22144,
1803,
752,
12,
45,
2421,
22144,
3829,
2742,
13,
288,
5411,
309,
261,
5668,
422,
446,
13,
288,
7734,
604,
394,
2754,
5621,
5411,
289,
5411,
467,
2421,
22144,
1803,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
467,
2421,
22144,
1803,
752,
12,
45,
2421,
22144,
3829,
2742,
13,
288,
5411,
309,
261,
5668,
422,
446,
13,
288,
7734,
604,
394,
2754,
5621,
5411,
289,
5411,
467,
2421,
22144,
1803,
... |
if (automaticPartName) { | if (automaticPartName && !automaticTitle) { | protected void setPartName(String partName) { automaticPartName = partName.equals(""); //$NON-NLS-1$ if (automaticPartName) { partName = getTitle(); } super.setPartName(partName);} | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/da7d6af20ab1a149b023b0f97143bd2007a7dab7/EditorPart.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/EditorPart.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
444,
1988,
461,
12,
780,
1087,
461,
13,
288,
202,
5854,
4941,
1988,
461,
273,
1087,
461,
18,
14963,
2932,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
430,
261,
5854,
4941,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
444,
1988,
461,
12,
780,
1087,
461,
13,
288,
202,
5854,
4941,
1988,
461,
273,
1087,
461,
18,
14963,
2932,
8863,
4329,
3993,
17,
5106,
17,
21,
8,
202,
202,
430,
261,
5854,
4941,
... |
myWrappedEditor.openFile(path, revision); | getWrappedEditor().openFile(path, revision); | public void openFile(String path, long revision) throws SVNException { myWrappedEditor.openFile(path, revision); } | 5695 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5695/fa0e399df26a509c001504ac74eeb9c49316d78e/SVNSynchronizeEditor.java/buggy/javasvn/src/org/tmatesoft/svn/core/internal/wc/SVNSynchronizeEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
31622,
12,
780,
589,
16,
1525,
6350,
13,
1216,
29537,
50,
503,
288,
3639,
336,
17665,
6946,
7675,
3190,
812,
12,
803,
16,
6350,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
31622,
12,
780,
589,
16,
1525,
6350,
13,
1216,
29537,
50,
503,
288,
3639,
336,
17665,
6946,
7675,
3190,
812,
12,
803,
16,
6350,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-10... |
return (('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z')); | return (('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z')); | private static boolean isLetter(char ch) { return (('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z')); } | 18648 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/18648/6a55df45b5e749262e5610405145a505d38c6c9e/TokenToWords.java/buggy/java/de/dfki/lt/mary/modules/en/TokenToWords.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
353,
13938,
12,
3001,
462,
13,
288,
202,
2463,
261,
2668,
69,
11,
1648,
462,
597,
462,
1648,
296,
94,
6134,
747,
7707,
37,
11,
1648,
462,
597,
462,
1648,
296,
62,
613... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
1250,
353,
13938,
12,
3001,
462,
13,
288,
202,
2463,
261,
2668,
69,
11,
1648,
462,
597,
462,
1648,
296,
94,
6134,
747,
7707,
37,
11,
1648,
462,
597,
462,
1648,
296,
62,
613... |
if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) { | if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) { | Augmentations handleStartElement(QName element, XMLAttributes attributes, Augmentations augs) { // should really determine whether a null augmentation is to // be returned on a case-by-case basis, rather than assuming // this method will always produce augmentations... if(augs == null) { augs = fAugmentations; augs.clear(); } if (DEBUG) { System.out.println("handleStartElement: " +element); } if (fNormalizeData) { // reset values fFirstChunk = true; fUnionType = false; fWhiteSpace = -1; } // if we are not skipping this element, and there is a content model, // we try to find the corresponding decl object for this element. // the reason we move this part of code here is to make sure the // error reported here (if any) is stored within the parent element's // context, instead of that of the current element. Object decl = null; if (fSkipValidationDepth < 0 && fCurrentCM != null) { decl = fCurrentCM.oneTransition(element, fCurrCMState, fSubGroupHandler); // it could be an element decl or a wildcard decl if (fCurrCMState[0] == XSCMValidator.FIRST_ERROR && fDoValidation) { XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType; //REVISIT: is it the only case we will have particle = null? if (ctype.fParticle != null) { reportSchemaError("cvc-complex-type.2.4.a", new Object[]{element.rawname, ctype.fParticle.toString()}); } else { reportSchemaError("cvc-complex-type.2.4.a", new Object[]{element.rawname, "mixed with no element content"}); } } } // push error reporter context: record the current position fXSIErrorReporter.pushContext(); // we receive prefix binding events before this one, // so at this point, the prefix bindings for this element is done, // and we need to push context when we receive another prefix binding. // but if fPushForNextBinding is still true, that means there has // been no prefix binding for this element. we still need to push // context, because the context is always popped in end element. if (fPushForNextBinding) fNamespaceSupport.pushContext(); else fPushForNextBinding = true; // root element if (fElementDepth == -1) { // at this point we assume that no XML schemas found in the instance document // thus we will not validate in the case dynamic feature is on or we found dtd grammar fDoValidation = fValidation && !(fValidationManager.isGrammarFound() || fDynamicValidation); //store the external schema locations, these locations will be set at root element, so any other // schemaLocation declaration for the same namespace will be effectively ignored.. becuase we // choose to take first location hint available for a particular namespace. storeLocations(fExternalSchemas, fExternalNoNamespaceSchema) ; //REVISIT: this JAXP processing shouldn't be done //in XMLSchemaValidator but in a separate component responsible for pre-parsing grammars // and SchemaValidator should be given these preParsed grammars before this component //attempts to validate -nb. processJAXPSchemaSource( fJaxpSchemaSource , fEntityResolver ); // parse schemas specified via schema location properties //parseSchemas(fExternalSchemas, fExternalNoNamespaceSchema); } fCurrentPSVI = (ElementPSVImpl)augs.getItem(Constants.ELEMENT_PSVI); if (fCurrentPSVI == null) { fCurrentPSVI = fElemPSVI; augs.putItem(Constants.ELEMENT_PSVI, fCurrentPSVI); } fCurrentPSVI.reset(); // get xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes, // parse them to get the grammars String sLocation = attributes.getValue(URI_XSI, XSI_SCHEMALOCATION); String nsLocation = attributes.getValue(URI_XSI, XSI_NONAMESPACESCHEMALOCATION); //store the location hints.. we need to do it so that we can defer the loading of grammar until //there is a reference to a component from that namespace. To provide location hints to the //application for a namespace storeLocations(sLocation, nsLocation) ; //REVISIT: We should do the same in XSDHandler also... we should not //load the actual grammar (eg. import) unless there is reference to it. //parseSchemas(sLocation, nsLocation); // REVISIT: we should not rely on presence of // schemaLocation or noNamespaceSchemaLocation // attributes if (sLocation !=null || nsLocation !=null) { // if we found grammar we should attempt to validate // based on values of validation & schema features // only fDoValidation = fValidation; } // if we are in the content of "skip", then just skip this element // REVISIT: is this the correct behaviour for ID constraints? -NG if (fSkipValidationDepth >= 0) { fElementDepth++; return augs; } // if it's not the root element, we push the current states in the stacks if (fElementDepth != -1) { ensureStackCapacity(); fChildCountStack[fElementDepth] = fChildCount+1; fChildCount = 0; fElemDeclStack[fElementDepth] = fCurrentElemDecl; fNilStack[fElementDepth] = fNil; fTypeStack[fElementDepth] = fCurrentType; fCMStack[fElementDepth] = fCurrentCM; fStringContent[fElementDepth] = fSawCharacters; fSawChildrenStack[fElementDepth] = fSawChildren; } // get the element decl for this element fCurrentElemDecl = null; fNil = false; XSWildcardDecl wildcard = null; // now check what kind of decl this element maps to if (decl != null) { if (decl instanceof XSElementDecl) { fCurrentElemDecl = (XSElementDecl)decl; } else { wildcard = (XSWildcardDecl)decl; } } // save the current content model state in the stack if (fElementDepth != -1) fCMStateStack[fElementDepth] = fCurrCMState; // increase the element depth after we've saved all states for the // parent element fElementDepth++; // if the wildcard is skip, then return if (wildcard != null && wildcard.fProcessContents == XSWildcardDecl.WILDCARD_SKIP) { fSkipValidationDepth = fElementDepth; return augs; } // try again to get the element decl if (fCurrentElemDecl == null) { //try to find schema grammar by different means.. SchemaGrammar sGrammar = findSchemaGrammar(XSDDescription.CONTEXT_ELEMENT , element.uri , null , element, attributes ) ; if (sGrammar != null){ fCurrentElemDecl = sGrammar.getGlobalElementDecl(element.localpart); } } // Element Locally Valid (Element) // 2 Its {abstract} must be false. if (fCurrentElemDecl != null && fCurrentElemDecl.isAbstract()) reportSchemaError("cvc-elt.2", new Object[]{element.rawname}); // get the type for the current element fCurrentType = null; if (fCurrentElemDecl != null) { // then get the type fCurrentType = fCurrentElemDecl.fType; } // get type from xsi:type String xsiType = attributes.getValue(URI_XSI, XSI_TYPE); if (xsiType != null) getAndCheckXsiType(element, xsiType, attributes); // if the element decl is not found if (fCurrentType == null) { if (fDoValidation) { // if this is no validation root, report an error, because // we can't find eith decl or type for this element if (fValidationRootDepth == -1) { // report error, because it's root element reportSchemaError("cvc-elt.1", new Object[]{element.rawname}); } // if wildcard = strict, report error else if (wildcard != null && wildcard.fProcessContents == XSWildcardDecl.WILDCARD_STRICT) { // report error, because wilcard = strict reportSchemaError("cvc-complex-type.2.4.c", new Object[]{element.rawname}); } } // no element decl or type found for this element. // if there is a validation root, then skip the whole element // because we choose not to do lax acssessment // otherwise, don't skip sub-elements if (fValidationRootDepth >= 0) fSkipValidationDepth = fElementDepth; return augs; } // we found a decl or a type, but there is no vlaidatoin root, // make the current element validation root if (fValidationRootDepth == -1) { fValidationRootDepth = fElementDepth; fValidationRoot = element.rawname; } // PSVI: add validation context fCurrentPSVI.fValidationContext = fValidationRoot; // PSVI: add element declaration fCurrentPSVI.fDeclaration = fCurrentElemDecl; // PSVI: add element type fCurrentPSVI.fTypeDecl = fCurrentType; // Element Locally Valid (Type) // 2 Its {abstract} must be false. if (fCurrentType.getXSType() == XSTypeDecl.COMPLEX_TYPE) { XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType; if (ctype.isAbstractType()) { reportSchemaError("cvc-type.2", new Object[]{"Element " + element.rawname + " is declared with a type that is abstract. Use xsi:type to specify a non-abstract type"}); } if (fNormalizeData) { // find out if the content type is simple and if variety is union // to be able to do character normalization if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) { if (ctype.fXSSimpleType.getVariety() == XSSimpleType.VARIETY_UNION) { fUnionType = true; } else { try { fWhiteSpace = ctype.fXSSimpleType.getWhitespace(); } catch (DatatypeException e){ // do nothing } } } } } // normalization if (fNormalizeData && fCurrentType.getXSType() == XSTypeDecl.SIMPLE_TYPE) { // if !union type XSSimpleType dv = (XSSimpleType)fCurrentType; if (dv.getVariety() == XSSimpleType.VARIETY_UNION) { fUnionType = true; } else { try { fWhiteSpace = dv.getWhitespace(); } catch (DatatypeException e){ // do nothing } } } // then try to get the content model fCurrentCM = null; if (fCurrentType.getXSType() == XSTypeDecl.COMPLEX_TYPE) { fCurrentCM = ((XSComplexTypeDecl)fCurrentType).getContentModel(fCMBuilder); } // and get the initial content model state fCurrCMState = null; if (fCurrentCM != null) fCurrCMState = fCurrentCM.startContentModel(); // and the buffer to hold the value of the element fBuffer.setLength(0); fSawCharacters = false; fSawChildren = false; // get information about xsi:nil String xsiNil = attributes.getValue(URI_XSI, XSI_NIL); // only deal with xsi:nil when there is an element declaration if (xsiNil != null && fCurrentElemDecl != null) getXsiNil(element, xsiNil); // now validate everything related with the attributes // first, get the attribute group XSAttributeGroupDecl attrGrp = null; if (fCurrentType.getXSType() == XSTypeDecl.COMPLEX_TYPE) { XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType; attrGrp = ctype.fAttrGrp; } processAttributes(element, attributes, attrGrp); // activate identity constraints if (fDoValidation) { fValueStoreCache.startElement(); fMatcherStack.pushContext(); if (fCurrentElemDecl != null) { fValueStoreCache.initValueStoresFor(fCurrentElemDecl); int icCount = fCurrentElemDecl.fIDCPos; int uniqueOrKey = 0; for (;uniqueOrKey < icCount; uniqueOrKey++) { if (fCurrentElemDecl.fIDConstraints[uniqueOrKey].getType() != IdentityConstraint.KEYREF) { activateSelectorFor(fCurrentElemDecl.fIDConstraints[uniqueOrKey]); } else break; } for (int keyref = uniqueOrKey; keyref < icCount; keyref++) { activateSelectorFor((IdentityConstraint)fCurrentElemDecl.fIDConstraints[keyref]); } } // call all active identity constraints int count = fMatcherStack.getMatcherCount(); for (int i = 0; i < count; i++) { XPathMatcher matcher = fMatcherStack.getMatcherAt(i); matcher.startElement(element, attributes, fCurrentElemDecl); } } return augs; } // handleStartElement(QName,XMLAttributes,boolean) | 6373 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6373/cf8fca03a702621ccd014c61dde15932b0f3b075/XMLSchemaValidator.java/clean/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
432,
14870,
1012,
1640,
1685,
1046,
12,
13688,
930,
16,
3167,
2498,
1677,
16,
432,
14870,
1012,
279,
9024,
13,
288,
3639,
368,
1410,
8654,
4199,
2856,
279,
446,
18260,
367,
353,
358,
540,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
432,
14870,
1012,
1640,
1685,
1046,
12,
13688,
930,
16,
3167,
2498,
1677,
16,
432,
14870,
1012,
279,
9024,
13,
288,
3639,
368,
1410,
8654,
4199,
2856,
279,
446,
18260,
367,
353,
358,
540,... |
{ | { | public boolean isPathEditable(TreePath path) { return isEditable(); } | 50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/3826e72d9ebe31a854c4d01d6c8f1ec65a8d80fe/JTree.java/buggy/core/src/classpath/javax/javax/swing/JTree.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
353,
743,
15470,
12,
2471,
743,
589,
13,
225,
288,
3639,
327,
353,
15470,
5621,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1250,
353,
743,
15470,
12,
2471,
743,
589,
13,
225,
288,
3639,
327,
353,
15470,
5621,
225,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
mClassifier= (new PackageContext(null, mPackage)).get(classifierName); | mClassifier = (new PackageContext(null, mPackage)).get(classifierName); | public void addImport(String name) { String packageName = getPackageName(name); String classifierName = getClassifierName(name); Object mPackage = getPackage(packageName); // import on demand if(classifierName.equals("*")) { parseState.addPackageContext(mPackage); Object perm=null; // try find an existing permission Iterator dependenciesIt = UmlHelper.getHelper().getCore() .getDependencies(mPackage, parseState.getComponent()) .iterator(); while(dependenciesIt.hasNext()){ Object dependency = dependenciesIt.next(); if(ModelFacade.isAPermission(dependency)){ perm = dependency; break; } } // if no existing permission was found. if(perm == null){ perm = UmlFactory.getFactory().getCore().buildPermission(parseState.getComponent(), mPackage); ModelFacade.setName(perm, ModelFacade.getName(parseState.getComponent())+ " -> "+ packageName); } } // single type import else { Object mClassifier=null; try { mClassifier= (new PackageContext(null, mPackage)).get(classifierName); parseState.addClassifierContext(mClassifier); Object perm = null; // try find an existing permission Iterator dependenciesIt = UmlHelper.getHelper().getCore() .getDependencies(mClassifier, parseState.getComponent()) .iterator(); while(dependenciesIt.hasNext()){ Object dependency = dependenciesIt.next(); if(ModelFacade.isAPermission(dependency)){ perm = dependency; break; } } // if no existing permission was found. if(perm == null){ perm = UmlFactory.getFactory().getCore().buildPermission(parseState.getComponent(), mClassifier); ModelFacade.setName(perm, ModelFacade.getName(parseState.getComponent())+ " -> "+ ModelFacade.getName(mClassifier)); } } catch(ClassifierNotFoundException e) { // Currently if a classifier cannot be found in the // model/classpath then information will be lost from // source files, because the classifier cannot be // created on the fly. cat.warn("Modeller.java: a classifier that was in the source"+ " file could not be generated in the model "+ "(to generate an imported classifier)- information lost\n"+ "\t"+e); } } } | 7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/ca3bcb5d6dd283c4553bcbfe50b108dc5d499768/Modeller.java/clean/src_new/org/argouml/uml/reveng/java/Modeller.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
5010,
12,
780,
508,
13,
565,
288,
202,
780,
9929,
273,
28951,
12,
529,
1769,
202,
780,
14622,
461,
273,
2900,
1251,
461,
12,
529,
1769,
202,
921,
312,
2261,
273,
11506,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
527,
5010,
12,
780,
508,
13,
565,
288,
202,
780,
9929,
273,
28951,
12,
529,
1769,
202,
780,
14622,
461,
273,
2900,
1251,
461,
12,
529,
1769,
202,
921,
312,
2261,
273,
11506,
... |
edges.add(new Edge(fromNode, parentWordNode, (double)acousticScore, (double)languageScore)); | addEdge(fromNode, parentWordNode, (double)acousticScore, (double)languageScore); | private void collapseWordPath(Node parentWordNode, Token token, float acousticScore, float languageScore) { if (token.isWord()) { /* * If this is a word, create a Node for it, and then create an * edge from the Node to the parentWordNode */ Node fromNode = getNode(token); edges.add(new Edge(fromNode, parentWordNode, (double)acousticScore, (double)languageScore)); if (token.getPredecessor() != null) { /* Collapse the token sequence ending in this token. */ collapseWordToken(token); } else { /* we've reached the sentence start token */ assert token.getWord().isSentenceStartWord(); initialNode = fromNode; } } else { /* * If a non-word token, just add the acoustic and language * scores to the current totals, and then move on to the * predecessor token. */ acousticScore += token.getAcousticScore(); languageScore += token.getLanguageScore(); collapseWordPath(parentWordNode, token.getPredecessor(), acousticScore, languageScore); /* Traverse the path(s) for the loser token(s). */ if (loserManager != null) { List list = loserManager.getAlternatePredecessors(token); if (list != null) { for (Iterator i = list.iterator(); i.hasNext();) { Token loser = (Token) i.next(); collapseWordPath(parentWordNode, loser, acousticScore, languageScore); } } } } } | 7874 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7874/b65e18fc4ba16c677ad1ca9d50b4c43ee6faf6bc/Lattice.java/buggy/edu/cmu/sphinx/result/Lattice.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
13627,
3944,
743,
12,
907,
982,
3944,
907,
16,
3155,
1147,
16,
21394,
1431,
1721,
83,
641,
335,
7295,
16,
1431,
2653,
7295,
13,
288,
3639,
309,
261,
2316,
18,
291,
3944,
1075... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
13627,
3944,
743,
12,
907,
982,
3944,
907,
16,
3155,
1147,
16,
21394,
1431,
1721,
83,
641,
335,
7295,
16,
1431,
2653,
7295,
13,
288,
3639,
309,
261,
2316,
18,
291,
3944,
1075... |
window.getCoolBarManager2(), parent); | (ICoolBarManager2) window.getCoolBarManager2(), parent); | public Control createCoolBarControl(Composite parent) { return actionBarConfigurer.getActionBarPresentationFactory().createCoolBarControl( window.getCoolBarManager2(), parent); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/4ab9153c33294fedde181b0a3efe60786aac7bd9/WorkbenchWindowConfigurer.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindowConfigurer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8888,
752,
39,
1371,
5190,
3367,
12,
9400,
982,
13,
288,
3639,
327,
1301,
5190,
809,
11278,
18,
588,
1803,
5190,
6351,
367,
1733,
7675,
2640,
39,
1371,
5190,
3367,
12,
540,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
8888,
752,
39,
1371,
5190,
3367,
12,
9400,
982,
13,
288,
3639,
327,
1301,
5190,
809,
11278,
18,
588,
1803,
5190,
6351,
367,
1733,
7675,
2640,
39,
1371,
5190,
3367,
12,
540,
202,
2... |
final String message = "Warnings while parsing the key bindings from the preference store."; | final String message = "Warnings while parsing the key bindings from the preference store"; | private static final void readBindingsFromPreferences( final IMemento preferences, final BindingManager bindingManager, final ICommandService commandService) { /* * If necessary, this list of status items will be constructed. It will * only contains instances of <code>IStatus</code>. */ List warningsToLog = new ArrayList(1); if (preferences != null) { final IMemento[] preferenceMementos = preferences .getChildren(ELEMENT_KEY_BINDING); int preferenceMementoCount = preferenceMementos.length; for (int i = preferenceMementoCount - 1; i >= 0; i--) { final IMemento memento = preferenceMementos[i]; // Read out the command id. String commandId = memento.getString(ATTRIBUTE_COMMAND_ID); if ((commandId == null) || (commandId.length() == 0)) { commandId = memento.getString(ATTRIBUTE_COMMAND); } if ((commandId != null) && (commandId.length() == 0)) { commandId = null; } final Command command; if (commandId != null) { command = commandService.getCommand(commandId); } else { command = null; } // Read out the scheme id. String schemeId = memento .getString(ATTRIBUTE_KEY_CONFIGURATION_ID); if ((schemeId == null) || (schemeId.length() == 0)) { schemeId = memento.getString(ATTRIBUTE_CONFIGURATION); if ((schemeId == null) || (schemeId.length() == 0)) { // The scheme id should never be null. This is invalid. final String message = "Key bindings need a scheme or key configuration: '" //$NON-NLS-1$ + commandId + "'."; //$NON-NLS-1$ final IStatus status = new Status(IStatus.WARNING, WorkbenchPlugin.PI_WORKBENCH, 0, message, null); warningsToLog.add(status); continue; } } // Read out the context id. String contextId = memento.getString(ATTRIBUTE_CONTEXT_ID); if (LEGACY_DEFAULT_SCOPE.equals(contextId)) { contextId = null; } else if ((contextId == null) || (contextId.length() == 0)) { contextId = memento.getString(ATTRIBUTE_SCOPE); if (LEGACY_DEFAULT_SCOPE.equals(contextId)) { contextId = null; } } if ((contextId == null) || (contextId.length() == 0)) { contextId = IContextIds.CONTEXT_ID_WINDOW; } // Read out the key sequence. String keySequenceText = memento .getString(ATTRIBUTE_KEY_SEQUENCE); KeySequence keySequence = null; if ((keySequenceText == null) || (keySequenceText.length() == 0)) { keySequenceText = memento.getString(ATTRIBUTE_STRING); if ((keySequenceText == null) || (keySequenceText.length() == 0)) { /* * The key sequence should never be null. This is * pointless */ final String message = "Key bindings need a key sequence or string: '" //$NON-NLS-1$ + commandId + "'."; //$NON-NLS-1$ final IStatus status = new Status(IStatus.WARNING, WorkbenchPlugin.PI_WORKBENCH, 0, message, null); warningsToLog.add(status); continue; } // The key sequence is in the old-style format. keySequence = convert2_1Sequence(parse2_1Sequence(keySequenceText)); } else { // The key sequence is in the new-style format. try { keySequence = KeySequence.getInstance(keySequenceText); } catch (final ParseException e) { final String message = "Could not parse: '" //$NON-NLS-1$ + keySequenceText + "': '" //$NON-NLS-1$ + commandId + "'."; //$NON-NLS-1$ final IStatus status = new Status(IStatus.WARNING, WorkbenchPlugin.PI_WORKBENCH, 0, message, null); warningsToLog.add(status); continue; } if (keySequence.isEmpty() || !keySequence.isComplete()) { final String message = "Key bindings cannot use an empty or incomplete key sequence: '" //$NON-NLS-1$ + keySequence + "': '" //$NON-NLS-1$ + commandId + "'."; //$NON-NLS-1$ final IStatus status = new Status(IStatus.WARNING, WorkbenchPlugin.PI_WORKBENCH, 0, message, null); warningsToLog.add(status); continue; } } // Read out the locale and platform. String locale = memento.getString(ATTRIBUTE_LOCALE); if ((locale != null) && (locale.length() == 0)) { locale = null; } String platform = memento.getString(ATTRIBUTE_PLATFORM); if ((platform != null) && (platform.length() == 0)) { platform = null; } // Read out the parameters final ParameterizedCommand parameterizedCommand; if (command == null) { parameterizedCommand = null; } else { parameterizedCommand = readParameters(memento, warningsToLog, command); } final Binding binding = new KeyBinding(keySequence, parameterizedCommand, schemeId, contextId, locale, platform, null, Binding.USER); bindingManager.addBinding(binding); } } // If there were any warnings, then log them now. if (!warningsToLog.isEmpty()) { final String message = "Warnings while parsing the key bindings from the preference store."; //$NON-NLS-1$ final IStatus status = new MultiStatus( WorkbenchPlugin.PI_WORKBENCH, 0, (IStatus[]) warningsToLog .toArray(new IStatus[warningsToLog.size()]), message, null); WorkbenchPlugin.log(message, status); } } | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/2aa0965bbe6d7e1c9acd243af620354c7eb93e19/BindingPersistence.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingPersistence.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
918,
855,
10497,
1265,
12377,
12,
1082,
202,
6385,
6246,
820,
83,
12750,
16,
727,
15689,
1318,
5085,
1318,
16,
1082,
202,
6385,
467,
2189,
1179,
1296,
1179,
13,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
918,
855,
10497,
1265,
12377,
12,
1082,
202,
6385,
6246,
820,
83,
12750,
16,
727,
15689,
1318,
5085,
1318,
16,
1082,
202,
6385,
467,
2189,
1179,
1296,
1179,
13,
288,
... |
if(readyARKFetchers.size() > 0) { return true; | synchronized (readyARKFetchers) { if(readyARKFetchers.size() > 0) { return true; } | public boolean hasReadyARKFetchers() { if(readyARKFetchers.size() > 0) { return true; } return false; } | 51834 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51834/cefff92253ea979d890a713f52c8c855570f6cef/ARKFetchManager.java/clean/src/freenet/node/ARKFetchManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
711,
8367,
9584,
5005,
414,
1435,
288,
202,
202,
430,
12,
1672,
9584,
5005,
414,
18,
1467,
1435,
405,
374,
13,
288,
1082,
202,
2463,
638,
31,
202,
202,
97,
202,
202,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1250,
711,
8367,
9584,
5005,
414,
1435,
288,
202,
202,
430,
12,
1672,
9584,
5005,
414,
18,
1467,
1435,
405,
374,
13,
288,
1082,
202,
2463,
638,
31,
202,
202,
97,
202,
202,
2... |
IResultSet rset = (IResultSet) iter.next( ); try | if ( iter.hasNext( ) ) | public Object get( String name, Scriptable start ) { Iterator iter = rsets.iterator( ); while ( iter.hasNext( ) ) { IResultSet rset = (IResultSet) iter.next( ); try { return rset.getValue( name ); } catch ( BirtException ex ) { } } throw new EvaluatorException("Can't find the column: " + name); } | 12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/544074a2df31cb03ea4d42939745b3e6e3701fd6/NativeRowObject.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/data/dte/NativeRowObject.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
336,
12,
514,
508,
16,
22780,
787,
262,
202,
95,
202,
202,
3198,
1400,
273,
436,
4424,
18,
9838,
12,
11272,
202,
202,
17523,
261,
1400,
18,
5332,
2134,
12,
262,
262,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
1033,
336,
12,
514,
508,
16,
22780,
787,
262,
202,
95,
202,
202,
3198,
1400,
273,
436,
4424,
18,
9838,
12,
11272,
202,
202,
17523,
261,
1400,
18,
5332,
2134,
12,
262,
262,
2... |
break; | public Signal getNextSignal() throws LemRuntimeException { Signal s; while (true) { if (signalSelfQueue.size() > 0) { s = (Signal)signalSelfQueue.remove(0); } else if (signalQueue.size() > 0) { s = (Signal)signalQueue.remove(0); } else { instanceInObject.propogateNextSignal(); continue; } break; } return s; } | 10434 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10434/2b7229ed900da6a69329a24772ebce3417c59c45/Instance.java/clean/trunk/src/runtime/Instance.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12032,
6927,
11208,
1435,
1216,
511,
351,
11949,
565,
288,
202,
11208,
272,
31,
202,
17523,
261,
3767,
13,
288,
202,
202,
430,
261,
10420,
10084,
3183,
18,
1467,
1435,
405,
374,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
12032,
6927,
11208,
1435,
1216,
511,
351,
11949,
565,
288,
202,
11208,
272,
31,
202,
17523,
261,
3767,
13,
288,
202,
202,
430,
261,
10420,
10084,
3183,
18,
1467,
1435,
405,
374,
13,... | |
writeTableHead("Failed downloads", new String[] { "", "Identifier", "Filename", "Size", "Type", "Success", "Reason", "Persistence", "Key" }, buf); | writeTableHead("Failed downloads", new String[] { "", "Identifier", "Filename", "Size", "MIME-Type", "Progress", "Reason", "Persistence", "Key" }, buf); | public void handleGet(URI uri, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { StringBuffer buf = new StringBuffer(2048); ctx.getPageMaker().makeHead(buf, "Queued Requests"); // First, get the queued requests, and separate them into different types. LinkedList completedDownloadToDisk = new LinkedList(); LinkedList completedDownloadToTemp = new LinkedList(); LinkedList completedUpload = new LinkedList(); LinkedList completedDirUpload = new LinkedList(); LinkedList failedDownload = new LinkedList(); LinkedList failedUpload = new LinkedList(); LinkedList failedDirUpload = new LinkedList(); LinkedList uncompletedDownload = new LinkedList(); LinkedList uncompletedUpload = new LinkedList(); LinkedList uncompletedDirUpload = new LinkedList(); ClientRequest[] reqs = fcp.getGlobalRequests(); Logger.minor(this, "Request count: "+reqs.length); for(int i=0;i<reqs.length;i++) { ClientRequest req = reqs[i]; if(req instanceof ClientGet) { ClientGet cg = (ClientGet) req; if(cg.hasSucceeded()) { if(cg.isDirect()) completedDownloadToTemp.add(cg); else if(cg.isToDisk()) completedDownloadToDisk.add(cg); else // FIXME Logger.error(this, "Don't know what to do with "+cg); } else if(cg.hasFinished()) { failedDownload.add(cg); } else { uncompletedDownload.add(cg); } } else if(req instanceof ClientPut) { ClientPut cp = (ClientPut) req; if(cp.hasSucceeded()) { completedUpload.add(cp); } else if(cp.hasFinished()) { failedUpload.add(cp); } else { uncompletedUpload.add(cp); } } else if(req instanceof ClientPutDir) { ClientPutDir cp = (ClientPutDir) req; if(cp.hasSucceeded()) { completedDirUpload.add(cp); } else if(cp.hasFinished()) { failedDirUpload.add(cp); } else { uncompletedDirUpload.add(cp); } } } if(!(completedDownloadToTemp.isEmpty() && completedDownloadToDisk.isEmpty() && completedUpload.isEmpty() && completedDirUpload.isEmpty())) { writeBigHeading("Completed requests", buf); if(!completedDownloadToTemp.isEmpty()) { writeTableHead("Completed downloads to temporary space", new String[] { "", "Identifier", "Size", "Type", "Download", "Persistence", "Key" }, buf ); for(Iterator i = completedDownloadToTemp.iterator();i.hasNext();) { ClientGet p = (ClientGet) i.next(); writeRowStart(buf); writeDeleteCell(p, buf); writeIdentifierCell(p, p.getURI(), buf); writeSizeCell(p.getDataSize(), buf); writeTypeCell(p.getMIMEType(), buf); writeDownloadCell(p, buf); writePersistenceCell(p, buf); writeKeyCell(p.getURI(), buf); writeRowEnd(buf); } writeTableEnd(buf); } if(!completedDownloadToDisk.isEmpty()) { writeTableHead("Completed downloads to disk", new String[] { "", "Identifier", "Filename", "Size", "Type", "Download", "Persistence", "Key" }, buf); for(Iterator i=completedDownloadToDisk.iterator();i.hasNext();) { ClientGet p = (ClientGet) i.next(); writeRowStart(buf); writeDeleteCell(p, buf); writeIdentifierCell(p, p.getURI(), buf); writeFilenameCell(p.getDestFilename(), buf); writeSizeCell(p.getDataSize(), buf); writeTypeCell(p.getMIMEType(), buf); writeDownloadCell(p, buf); writePersistenceCell(p, buf); writeKeyCell(p.getURI(), buf); writeRowEnd(buf); } writeTableEnd(buf); } if(!completedUpload.isEmpty()) { writeTableHead("Completed uploads", new String[] { "", "Key", "Filename", "Size", "Type", "Persistence", "Identifier" }, buf); for(Iterator i=completedUpload.iterator();i.hasNext();) { ClientPut p = (ClientPut) i.next(); writeRowStart(buf); writeDeleteCell(p, buf); writeIdentifierCell(p, p.getFinalURI(), buf); if(p.isDirect()) writeDirectCell(buf); else writeFilenameCell(p.getOrigFilename(), buf); writeSizeCell(p.getDataSize(), buf); writeTypeCell(p.getMIMEType(), buf); writePersistenceCell(p, buf); writeKeyCell(p.getFinalURI(), buf); writeRowEnd(buf); } writeTableEnd(buf); } if(!completedDirUpload.isEmpty()) { // FIXME include filename?? writeTableHead("Completed directory uploads", new String[] { "", "Identifier", "Files", "Total Size", "Persistence", "Key" }, buf); for(Iterator i=completedUpload.iterator();i.hasNext();) { ClientPutDir p = (ClientPutDir) i.next(); writeRowStart(buf); writeDeleteCell(p, buf); writeIdentifierCell(p, p.getFinalURI(), buf); writeNumberCell(p.getNumberOfFiles(), buf); writeSizeCell(p.getTotalDataSize(), buf); writePersistenceCell(p, buf); writeKeyCell(p.getFinalURI(), buf); writeRowEnd(buf); } writeTableEnd(buf); } } /* FIXME color-coded progress bars. * It would be really nice to have a color-coded progress bar. * We can then show what part is successful, what part isn't tried yet, * what part has each different well known error code... */ if(!(failedDownload.isEmpty() && failedUpload.isEmpty())) { writeBigHeading("Failed requests", buf); if(!failedDownload.isEmpty()) { writeTableHead("Failed downloads", new String[] { "", "Identifier", "Filename", "Size", "Type", "Success", "Reason", "Persistence", "Key" }, buf); for(Iterator i=failedDownload.iterator();i.hasNext();) { ClientGet p = (ClientGet) i.next(); writeRowStart(buf); writeDeleteCell(p, buf); writeIdentifierCell(p, p.getURI(), buf); if(p.isDirect()) writeDirectCell(buf); else writeFilenameCell(p.getDestFilename(), buf); writeSizeCell(p.getDataSize(), buf); writeTypeCell(p.getMIMEType(), buf); writeSuccessFractionCell(p, buf); writeFailureReasonCell(p, buf); writePersistenceCell(p, buf); writeKeyCell(p.getURI(), buf); writeRowEnd(buf); } writeTableEnd(buf); } if(!failedUpload.isEmpty()) { writeTableHead("Failed uploads", new String[] { "", "Identifier", "Filename", "Size", "Type", "Success", "Reason", "Persistence", "Key" }, buf); for(Iterator i=failedUpload.iterator();i.hasNext();) { ClientPut p = (ClientPut) i.next(); writeRowStart(buf); writeDeleteCell(p, buf); writeIdentifierCell(p, p.getFinalURI(), buf); if(p.isDirect()) writeDirectCell(buf); else writeFilenameCell(p.getOrigFilename(), buf); writeSizeCell(p.getDataSize(), buf); writeTypeCell(p.getMIMEType(), buf); writeSuccessFractionCell(p, buf); writeFailureReasonCell(p, buf); writePersistenceCell(p, buf); writeKeyCell(p.getFinalURI(), buf); writeRowEnd(buf); } writeTableEnd(buf); } if(!failedDirUpload.isEmpty()) { writeTableHead("Failed directory uploads", new String[] { "", "Identifier", "Files", "Total Size", "Success", "Reason", "Persistence", "Key" }, buf); for(Iterator i=failedDirUpload.iterator();i.hasNext();) { ClientPutDir p = (ClientPutDir) i.next(); writeRowStart(buf); writeDeleteCell(p, buf); writeIdentifierCell(p, p.getFinalURI(), buf); writeNumberCell(p.getNumberOfFiles(), buf); writeSizeCell(p.getTotalDataSize(), buf); writeSuccessFractionCell(p, buf); writeFailureReasonCell(p, buf); writePersistenceCell(p, buf); writeKeyCell(p.getFinalURI(), buf); writeRowEnd(buf); } writeTableEnd(buf); } } if(!(uncompletedDownload.isEmpty() && uncompletedUpload.isEmpty() && uncompletedDirUpload.isEmpty())) { writeBigHeading("Requests in progress", buf); if(!uncompletedDownload.isEmpty()) { writeTableHead("Downloads in progress", new String[] { "", "Identifier", "Filename", "Size", "Type", "Success", "Persistence", "Key" }, buf); for(Iterator i = uncompletedDownload.iterator();i.hasNext();) { ClientGet p = (ClientGet) i.next(); writeRowStart(buf); writeDeleteCell(p, buf); writeIdentifierCell(p, p.getURI(), buf); if(p.isDirect()) writeDirectCell(buf); else writeFilenameCell(p.getDestFilename(), buf); writeSizeCell(p.getDataSize(), buf); writeTypeCell(p.getMIMEType(), buf); writeSuccessFractionCell(p, buf); writePersistenceCell(p, buf); writeKeyCell(p.getURI(), buf); writeRowEnd(buf); } writeTableEnd(buf); } if(!uncompletedUpload.isEmpty()) { writeTableHead("Uploads in progress", new String[] { "", "Identifier", "Filename", "Size", "Type", "Success", "Persistence", "Key" }, buf); for(Iterator i = uncompletedUpload.iterator();i.hasNext();) { ClientPut p = (ClientPut) i.next(); writeRowStart(buf); writeDeleteCell(p, buf); writeIdentifierCell(p, p.getFinalURI(), buf); if(p.isDirect()) writeDirectCell(buf); else writeFilenameCell(p.getOrigFilename(), buf); writeSizeCell(p.getDataSize(), buf); writeTypeCell(p.getMIMEType(), buf); writeSuccessFractionCell(p, buf); writePersistenceCell(p, buf); writeKeyCell(p.getFinalURI(), buf); writeRowEnd(buf); } writeTableEnd(buf); } if(!uncompletedDirUpload.isEmpty()) { writeTableHead("Directory uploads in progress", new String[] { "", "Identifier", "Files", "Total Size", "Success", "Persistence", "Key" }, buf); for(Iterator i=uncompletedDirUpload.iterator();i.hasNext();) { ClientPutDir p = (ClientPutDir) i.next(); writeRowStart(buf); writeDeleteCell(p, buf); writeIdentifierCell(p, p.getFinalURI(), buf); writeNumberCell(p.getNumberOfFiles(), buf); writeSizeCell(p.getTotalDataSize(), buf); writeSuccessFractionCell(p, buf); writePersistenceCell(p, buf); writeKeyCell(p.getFinalURI(), buf); writeRowEnd(buf); } writeTableEnd(buf); } } ctx.getPageMaker().makeTail(buf); this.writeReply(ctx, 200, "text/html", "OK", buf.toString()); } | 50287 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50287/2a50af2c7d1c8c3a5ad945e6a509003db2cd8d7f/QueueToadlet.java/buggy/src/freenet/clients/http/QueueToadlet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
225,
202,
15069,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
9506,
202,
780,
1892,
168... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1640,
967,
12,
3098,
2003,
16,
2974,
361,
1810,
1042,
1103,
13,
225,
202,
15069,
2974,
361,
1810,
1042,
7395,
503,
16,
1860,
16,
9942,
503,
288,
9506,
202,
780,
1892,
168... |
private int traverseComplexTypeDecl( Element complexTypeDecl ) throws Exception{ int complexTypeAbstract = fStringPool.addSymbol( complexTypeDecl.getAttribute( SchemaSymbols.ATT_ABSTRACT )); String isAbstract = complexTypeDecl.getAttribute( SchemaSymbols.ATT_ABSTRACT ); int complexTypeBase = fStringPool.addSymbol( complexTypeDecl.getAttribute( SchemaSymbols.ATT_BASE )); String base = complexTypeDecl.getAttribute(SchemaSymbols.ATT_BASE); int complexTypeBlock = fStringPool.addSymbol( complexTypeDecl.getAttribute( SchemaSymbols.ATT_BLOCK )); String blockSet = complexTypeDecl.getAttribute( SchemaSymbols.ATT_BLOCK ); int complexTypeContent = fStringPool.addSymbol( complexTypeDecl.getAttribute( SchemaSymbols.ATT_CONTENT )); String content = complexTypeDecl.getAttribute(SchemaSymbols.ATT_CONTENT); int complexTypeDerivedBy = fStringPool.addSymbol( complexTypeDecl.getAttribute( SchemaSymbols.ATT_DERIVEDBY )); String derivedBy = complexTypeDecl.getAttribute( SchemaSymbols.ATT_DERIVEDBY ); int complexTypeFinal = fStringPool.addSymbol( complexTypeDecl.getAttribute( SchemaSymbols.ATT_FINAL )); String finalSet = complexTypeDecl.getAttribute( SchemaSymbols.ATT_FINAL ); int complexTypeID = fStringPool.addSymbol( complexTypeDecl.getAttribute( SchemaSymbols.ATTVAL_ID )); String typeId = complexTypeDecl.getAttribute( SchemaSymbols.ATTVAL_ID ); int complexTypeName = fStringPool.addSymbol( complexTypeDecl.getAttribute( SchemaSymbols.ATT_NAME )); String typeName = complexTypeDecl.getAttribute(SchemaSymbols.ATT_NAME); boolean isNamedType = false; if ( DEBUGGING ) System.out.println("traversing complex Type : " + typeName +","+base+","+content+"."); if (typeName.equals("")) { // gensym a unique name //typeName = "http://www.apache.org/xml/xerces/internalType"+fTypeCount++; typeName = "#"+fAnonTypeCount++; } else { fCurrentTypeNameStack.push(typeName); isNamedType = true; } int scopeDefined = fScopeCount++; int previousScope = fCurrentScope; fCurrentScope = scopeDefined; Element child = null; int contentSpecType = -1; int csnType = 0; int left = -2; int right = -2; ComplexTypeInfo baseTypeInfo = null; //if base is a complexType; DatatypeValidator baseTypeValidator = null; //if base is a simple type or a complex type derived from a simpleType DatatypeValidator simpleTypeValidator = null; int baseTypeSymbol = -1; String fullBaseName = ""; boolean baseIsSimpleSimple = false; boolean baseIsComplexSimple = false; boolean derivedByRestriction = true; boolean derivedByExtension = false; int baseContentSpecHandle = -1; Element baseTypeNode = null; //int parsedderivedBy = parseComplexDerivedBy(derivedBy); //handle the inhreitance here. if (base.length()>0) { //first check if derivedBy is present if (derivedBy.length() == 0) { reportGenericSchemaError("derivedBy must be present when base is present in " +SchemaSymbols.ELT_COMPLEXTYPE +" "+ typeName); } else { if (derivedBy.equals(SchemaSymbols.ATTVAL_EXTENSION)) { derivedByRestriction = false; } String prefix = ""; String localpart = base; int colonptr = base.indexOf(":"); if ( colonptr > 0) { prefix = base.substring(0,colonptr); localpart = base.substring(colonptr+1); } int localpartIndex = fStringPool.addSymbol(localpart); String typeURI = resolvePrefixToURI(prefix); // check if the base type is from the same Schema; if (!typeURI.equals(fTargetNSURIString) && !typeURI.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) ) { baseTypeInfo = getTypeInfoFromNS(typeURI, localpart); if (baseTypeInfo == null) { baseTypeValidator = getTypeValidatorFromNS(typeURI, localpart); if (baseTypeValidator == null) { //TO DO: report error here; System.out.println("Counld not find base type " +localpart + " in schema " + typeURI); } else{ baseIsSimpleSimple = true; } } } else { fullBaseName = typeURI+","+localpart; // assume the base is a complexType and try to locate the base type first baseTypeInfo = (ComplexTypeInfo) fComplexTypeRegistry.get(fullBaseName); // if not found, 2 possibilities: 1: ComplexType in question has not been compiled yet; // 2: base is SimpleTYpe; if (baseTypeInfo == null) { baseTypeValidator = fDatatypeRegistry.getDatatypeValidator(localpart); if (baseTypeValidator == null) { baseTypeNode = getTopLevelComponentByName(SchemaSymbols.ELT_COMPLEXTYPE,localpart); if (baseTypeNode != null) { baseTypeSymbol = traverseComplexTypeDecl( baseTypeNode ); baseTypeInfo = (ComplexTypeInfo) fComplexTypeRegistry.get(fStringPool.toString(baseTypeSymbol)); //REVISIT: should it be fullBaseName; } else { baseTypeNode = getTopLevelComponentByName(SchemaSymbols.ELT_SIMPLETYPE, localpart); if (baseTypeNode != null) { baseTypeSymbol = traverseSimpleTypeDecl( baseTypeNode ); simpleTypeValidator = baseTypeValidator = fDatatypeRegistry.getDatatypeValidator(localpart); if (simpleTypeValidator == null) { //TO DO: signal error here. } baseIsSimpleSimple = true; } else { reportGenericSchemaError("Base type could not be found : " + base); } } } else { simpleTypeValidator = baseTypeValidator; baseIsSimpleSimple = true; } } } //Schema Spec : 5.11: Complex Type Definition Properties Correct : 2 if (baseIsSimpleSimple && derivedByRestriction) { reportGenericSchemaError("base is a simpledType, can't derive by restriction in " + typeName); } //if the base is a complexType if (baseTypeInfo != null ) { //Schema Spec : 5.11: Derivation Valid ( Extension ) 1.1.1 // 5.11: Derivation Valid ( Restriction, Complex ) 1.2.1 if (derivedByRestriction) { //REVISIT: check base Type's finalset does not include "restriction" } else { //REVISIT: check base Type's finalset doest not include "extension" } if ( baseTypeInfo.contentSpecHandle > -1) { if (derivedByRestriction) { //REVISIT: !!! really hairy staff to check the particle derivation OK in 5.10 checkParticleDerivationOK(complexTypeDecl, baseTypeNode); } baseContentSpecHandle = baseTypeInfo.contentSpecHandle; } else if ( baseTypeInfo.datatypeValidator != null ) { baseTypeValidator = baseTypeInfo.datatypeValidator; baseIsComplexSimple = true; } } //Schema Spec : 5.11: Derivation Valid ( Extension ) 1.1.1 if (baseIsComplexSimple && !derivedByRestriction ) { reportGenericSchemaError("base is ComplexSimple, can't derive by extension in " + typeName); } } // END of if (derivedBy.length() == 0) {} else {} } // END of if (base.length() > 0) {} // skip refinement and annotations child = null; if (baseIsComplexSimple) { contentSpecType = XMLElementDecl.TYPE_SIMPLE; int numEnumerationLiterals = 0; int numFacets = 0; Hashtable facetData = new Hashtable(); Vector enumData = new Vector(); for (child = XUtil.getFirstChildElement(complexTypeDecl); child != null && (child.getNodeName().equals(SchemaSymbols.ELT_MINEXCLUSIVE) || child.getNodeName().equals(SchemaSymbols.ELT_MININCLUSIVE) || child.getNodeName().equals(SchemaSymbols.ELT_MAXEXCLUSIVE) || child.getNodeName().equals(SchemaSymbols.ELT_MAXINCLUSIVE) || child.getNodeName().equals(SchemaSymbols.ELT_PRECISION) || child.getNodeName().equals(SchemaSymbols.ELT_SCALE) || child.getNodeName().equals(SchemaSymbols.ELT_LENGTH) || child.getNodeName().equals(SchemaSymbols.ELT_MINLENGTH) || child.getNodeName().equals(SchemaSymbols.ELT_MAXLENGTH) || child.getNodeName().equals(SchemaSymbols.ELT_ENCODING) || child.getNodeName().equals(SchemaSymbols.ELT_PERIOD) || child.getNodeName().equals(SchemaSymbols.ELT_DURATION) || child.getNodeName().equals(SchemaSymbols.ELT_ENUMERATION) || child.getNodeName().equals(SchemaSymbols.ELT_PATTERN) || child.getNodeName().equals(SchemaSymbols.ELT_ANNOTATION)); child = XUtil.getNextSiblingElement(child)) { if ( child.getNodeType() == Node.ELEMENT_NODE ) { Element facetElt = (Element) child; numFacets++; if (facetElt.getNodeName().equals(SchemaSymbols.ELT_ENUMERATION)) { numEnumerationLiterals++; enumData.addElement(facetElt.getAttribute(SchemaSymbols.ATT_VALUE)); //Enumerations can have annotations ? ( 0 | 1 ) Element enumContent = XUtil.getFirstChildElement( facetElt ); if( enumContent != null && enumContent.getNodeName().equals( SchemaSymbols.ELT_ANNOTATION ) ){ traverseAnnotationDecl( child ); } // TO DO: if Jeff check in new changes to TraverseSimpleType, copy them over } else { facetData.put(facetElt.getNodeName(),facetElt.getAttribute( SchemaSymbols.ATT_VALUE )); } } } if (numEnumerationLiterals > 0) { facetData.put(SchemaSymbols.ELT_ENUMERATION, enumData); } // overide the facets of the baseTypeValidator // Talk with Eric - This is not allowed in the new Architecture //if (numFacets > 0) // baseTypeValidator.setFacets(facetData, derivedBy ); // now we are ready with our own simpleTypeValidator simpleTypeValidator = baseTypeValidator; if (child != null) { reportGenericSchemaError("Invalid Schema Document"); } } // if content = textonly, base is a datatype if (content.equals(SchemaSymbols.ATTVAL_TEXTONLY)) { //TO DO if (base.length() == 0) { simpleTypeValidator = baseTypeValidator = fDatatypeRegistry.getDatatypeValidator(SchemaSymbols.ATTVAL_STRING); } else if (fDatatypeRegistry.getDatatypeValidator(base) == null) // must be datatype reportSchemaError(SchemaMessageProvider.NotADatatype, new Object [] { base }); //REVISIT check forward refs //handle datatypes contentSpecType = XMLElementDecl.TYPE_SIMPLE; /**** left = fSchemaGrammar.addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_LEAF, fStringPool.addSymbol(base), -1, false); /****/ } else { if (!baseIsComplexSimple) { contentSpecType = XMLElementDecl.TYPE_CHILDREN; } csnType = XMLContentSpec.CONTENTSPECNODE_SEQ; boolean mixedContent = false; //REVISIT: is the default content " elementOnly" boolean elementContent = true; boolean textContent = false; boolean emptyContent = false; left = -2; right = -2; boolean hadContent = false; if (content.equals(SchemaSymbols.ATTVAL_EMPTY)) { contentSpecType = XMLElementDecl.TYPE_EMPTY; emptyContent = true; elementContent = false; left = -1; // no contentSpecNode needed } else if (content.equals(SchemaSymbols.ATTVAL_MIXED) ) { contentSpecType = XMLElementDecl.TYPE_MIXED; mixedContent = true; elementContent = false; csnType = XMLContentSpec.CONTENTSPECNODE_CHOICE; } else if (content.equals(SchemaSymbols.ATTVAL_ELEMENTONLY) || content.equals("")) { elementContent = true; } else if (content.equals(SchemaSymbols.ATTVAL_TEXTONLY)) { textContent = true; elementContent = false; } if (mixedContent) { // add #PCDATA leaf left = fSchemaGrammar.addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_LEAF, -1, // -1 means "#PCDATA" is name -1, false); csnType = XMLContentSpec.CONTENTSPECNODE_CHOICE; } boolean seeOtherParticle = false; boolean seeAll = false; for (child = XUtil.getFirstChildElement(complexTypeDecl); child != null; child = XUtil.getNextSiblingElement(child)) { int index = -2; // to save the particle's contentSpec handle hadContent = true; boolean seeParticle = false; String childName = child.getNodeName(); if (childName.equals(SchemaSymbols.ELT_ELEMENT)) { if (mixedContent || elementContent) { if ( DEBUGGING ) System.out.println(" child element name " + child.getAttribute(SchemaSymbols.ATT_NAME)); QName eltQName = traverseElementDecl(child); index = fSchemaGrammar.addContentSpecNode( XMLContentSpec.CONTENTSPECNODE_LEAF, eltQName.localpart, eltQName.uri, false); seeParticle = true; seeOtherParticle = true; } else { reportSchemaError(SchemaMessageProvider.EltRefOnlyInMixedElemOnly, null); } } else if (childName.equals(SchemaSymbols.ELT_GROUP)) { index = traverseGroupDecl(child); seeParticle = true; seeOtherParticle = true; } else if (childName.equals(SchemaSymbols.ELT_ALL)) { index = traverseAll(child); seeParticle = true; seeAll = true; } else if (childName.equals(SchemaSymbols.ELT_CHOICE)) { index = traverseChoice(child); seeParticle = true; seeOtherParticle = true; } else if (childName.equals(SchemaSymbols.ELT_SEQUENCE)) { index = traverseSequence(child); seeParticle = true; seeOtherParticle = true; } else if (childName.equals(SchemaSymbols.ELT_ATTRIBUTE) || childName.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP)) { break; // attr processing is done later on in this method } else if (childName.equals(SchemaSymbols.ELT_ANY)) { contentSpecType = fStringPool.addSymbol("ANY"); left = -1; } else { // datatype qual if (base.equals("")) reportSchemaError(SchemaMessageProvider.DatatypeWithType, null); else reportSchemaError(SchemaMessageProvider.DatatypeQualUnsupported, new Object [] { childName }); } // if base is complextype with simpleType content, can't have any particle children at all. if (baseIsComplexSimple && seeParticle) { reportGenericSchemaError("In complexType "+typeName+", base type is complextype with simpleType content, can't have any particle children at all"); hadContent = false; left = index = -2; contentSpecType = XMLElementDecl.TYPE_SIMPLE; break; } // check the minOccurs and maxOccurs of the particle, and fix the // contentspec accordingly if (seeParticle) { index = expandContentModel(index, child); } //end of if (seeParticle) if (seeAll && seeOtherParticle) { reportGenericSchemaError ( " 'All' group needs to be the only child in Complextype : " + typeName); } if (seeAll) { //TO DO: //check the minOccurs = 1 and maxOccurs = 1 } if (left == -2) { left = index; } else if (right == -2) { right = index; } else { left = fSchemaGrammar.addContentSpecNode(csnType, left, right, false); right = index; } } //end looping through the children if (hadContent && right != -2) left = fSchemaGrammar.addContentSpecNode(csnType, left, right, false); if (mixedContent && hadContent) { // set occurrence count left = fSchemaGrammar.addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE, left, -1, false); } } // if derived by extension and base complextype has a content model, // compose the final content model by concatenating the base and the // current in sequence. if (!derivedByRestriction && baseContentSpecHandle > -1 ) { left = fSchemaGrammar.addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_SEQ, baseContentSpecHandle, left, false); } // REVISIT: this is when sees a topelevel <complexType name="abc">attrs*</complexType> if (content.length() == 0 && base.length() == 0 && left == -2) { contentSpecType = XMLElementDecl.TYPE_ANY; } if ( DEBUGGING ) System.out.println("!!!!!>>>>>" + typeName+", "+ baseTypeInfo + ", " + baseContentSpecHandle +", " + left +", "+scopeDefined); ComplexTypeInfo typeInfo = new ComplexTypeInfo(); typeInfo.baseComplexTypeInfo = baseTypeInfo; typeInfo.baseDataTypeValidator = baseTypeValidator; int derivedByInt = -1; if (derivedBy.length() > 0) { derivedByInt = parseComplexDerivedBy(derivedBy); } typeInfo.derivedBy = derivedByInt; typeInfo.scopeDefined = scopeDefined; typeInfo.contentSpecHandle = left; typeInfo.contentType = contentSpecType; typeInfo.datatypeValidator = simpleTypeValidator; typeInfo.blockSet = parseBlockSet(complexTypeDecl.getAttribute(SchemaSymbols.ATT_BLOCK)); typeInfo.finalSet = parseFinalSet(complexTypeDecl.getAttribute(SchemaSymbols.ATT_FINAL)); //add a template element to the grammar element decl pool. int typeNameIndex = fStringPool.addSymbol(typeName); int templateElementNameIndex = fStringPool.addSymbol("$"+typeName); typeInfo.templateElementIndex = fSchemaGrammar.addElementDecl(new QName(-1, templateElementNameIndex,typeNameIndex,fTargetNSURI), (fTargetNSURI==-1) ? -1 : fCurrentScope, scopeDefined, contentSpecType, left, -1, simpleTypeValidator); typeInfo.attlistHead = fSchemaGrammar.getFirstAttributeDeclIndex(typeInfo.templateElementIndex); // (attribute | attrGroupRef)* for (child = XUtil.getFirstChildElement(complexTypeDecl); child != null; child = XUtil.getNextSiblingElement(child)) { String childName = child.getNodeName(); if (childName.equals(SchemaSymbols.ELT_ATTRIBUTE)) { if ((baseIsComplexSimple||baseIsSimpleSimple) && derivedByRestriction) { reportGenericSchemaError("In complexType "+typeName+", base type has simpleType content and derivation method is 'restriction', can't have any attribute children at all"); break; } traverseAttributeDecl(child, typeInfo); } else if ( childName.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP) ) { if ((baseIsComplexSimple||baseIsSimpleSimple) && derivedByRestriction) { reportGenericSchemaError("In complexType "+typeName+", base type has simpleType content and derivation method is 'restriction', can't have any attribute children at all"); break; } traverseAttributeGroupDecl(child,typeInfo); } } typeInfo.attlistHead = fSchemaGrammar.getFirstAttributeDeclIndex(typeInfo.templateElementIndex); // merge in base type's attribute decls if (baseTypeInfo != null && baseTypeInfo.attlistHead > -1 ) { int attDefIndex = baseTypeInfo.attlistHead; while ( attDefIndex > -1 ) { fSchemaGrammar.getAttributeDecl(attDefIndex, fTempAttributeDecl); attDefIndex = fSchemaGrammar.getNextAttributeDeclIndex(attDefIndex); // if found a duplicate, if it is derived by restriction. then skip the one from the base type if (fSchemaGrammar.getAttributeDeclIndex(typeInfo.templateElementIndex, fTempAttributeDecl.name) > -1) { if (derivedByRestriction) { continue; } } //REVISIT: // int enumeration = ???? fSchemaGrammar.addAttDef( typeInfo.templateElementIndex, fTempAttributeDecl.name, fTempAttributeDecl.type, -1, fTempAttributeDecl.defaultType, fTempAttributeDecl.defaultValue, fTempAttributeDecl.datatypeValidator); } } if (!typeName.startsWith("#")) { typeName = fTargetNSURIString + "," + typeName; } fComplexTypeRegistry.put(typeName,typeInfo); // before exit the complex type definition, restore the scope, mainly for nested Anonymous Types fCurrentScope = previousScope; if (isNamedType) { fCurrentTypeNameStack.pop(); checkRecursingComplexType(); } typeNameIndex = fStringPool.addSymbol(typeName); return typeNameIndex; } // end of method: traverseComplexTypeDecl | 4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/ae57cbeb1ad12a17811053209a4f98f529cf78c6/TraverseSchema.java/buggy/src/org/apache/xerces/validators/schema/TraverseSchema.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
10080,
12795,
559,
3456,
12,
3010,
7233,
559,
3456,
262,
1216,
1185,
95,
540,
509,
7233,
559,
7469,
225,
273,
284,
780,
2864,
18,
1289,
5335,
12,
4766,
13491,
7233,
559,
3456,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
10080,
12795,
559,
3456,
12,
3010,
7233,
559,
3456,
262,
1216,
1185,
95,
540,
509,
7233,
559,
7469,
225,
273,
284,
780,
2864,
18,
1289,
5335,
12,
4766,
13491,
7233,
559,
3456,
... | ||
.getString("Workbench.renameToolTip")); | .getString("Workbench.refreshToolTip")); | public IWorkbenchAction create(IWorkbenchWindow window) { if (window == null) { throw new IllegalArgumentException(); } RetargetAction action = new RetargetAction(getId(), WorkbenchMessages.getString("Workbench.rename")); //$NON-NLS-1$ //$NON-NLS-2$ action.setToolTipText(WorkbenchMessages .getString("Workbench.renameToolTip")); //$NON-NLS-1$ window.getPartService().addPartListener(action); action.setActionDefinitionId("org.eclipse.ui.edit.rename"); //$NON-NLS-1$ return action; } | 56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/a068a7b2f086dec18f37d899ac6f919caaf29048/ActionFactory.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
467,
2421,
22144,
1803,
752,
12,
45,
2421,
22144,
3829,
2742,
13,
288,
5411,
309,
261,
5668,
422,
446,
13,
288,
7734,
604,
394,
2754,
5621,
5411,
289,
5411,
17100,
826,
1803,
1301,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
467,
2421,
22144,
1803,
752,
12,
45,
2421,
22144,
3829,
2742,
13,
288,
5411,
309,
261,
5668,
422,
446,
13,
288,
7734,
604,
394,
2754,
5621,
5411,
289,
5411,
17100,
826,
1803,
1301,
... |
if (! args[0].isKindOf(runtime.getClass("String"))) { throw new TypeError(runtime, args[0], runtime.getClass("String")); } | if (!args[0].isKindOf(runtime.getClasses().getNilClass()) && !args[0].isKindOf(runtime.getClasses().getStringClass())) { throw new TypeError(runtime, args[0], runtime.getClasses().getStringClass()); } | public RubyArray readlines(IRubyObject[] args) { IRubyObject[] separatorArgument; if (args.length > 0) { if (! args[0].isKindOf(runtime.getClass("String"))) { throw new TypeError(runtime, args[0], runtime.getClass("String")); } separatorArgument = new IRubyObject[] { args[0] }; } else { separatorArgument = IRubyObject.NULL_ARRAY; } RubyArray result = RubyArray.newArray(runtime); IRubyObject line; while (! (line = internalGets(separatorArgument)).isNil()) { result.append(line); } return result; } | 45221 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45221/4c689a812e20d4fcf2da0cdc9b527b00cc1960ef/RubyIO.java/buggy/src/org/jruby/RubyIO.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
1076,
17546,
12,
7937,
10340,
921,
8526,
833,
13,
288,
3639,
15908,
10340,
921,
8526,
4182,
1379,
31,
3639,
309,
261,
1968,
18,
2469,
405,
374,
13,
288,
5411,
309,
16051,
833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19817,
1076,
17546,
12,
7937,
10340,
921,
8526,
833,
13,
288,
3639,
15908,
10340,
921,
8526,
4182,
1379,
31,
3639,
309,
261,
1968,
18,
2469,
405,
374,
13,
288,
5411,
309,
16051,
833... |
else | } else { { | protected void removeFiles(File d, String[] files, String[] dirs) { if (files.length > 0) { log("Deleting " + files.length + " files from " + d.getAbsolutePath()); for (int j=0; j<files.length; j++) { File f = new File(d, files[j]); log("Deleting " + f.getAbsolutePath(), verbosity); if (!f.delete()) { String message="Unable to delete file " + f.getAbsolutePath(); if(failonerror) throw new BuildException(message); else log(message, quiet ? Project.MSG_VERBOSE : Project.MSG_WARN); } } } if (dirs.length > 0 && includeEmpty) { int dirCount = 0; for (int j=dirs.length-1; j>=0; j--) { File dir = new File(d, dirs[j]); String[] dirFiles = dir.list(); if (dirFiles == null || dirFiles.length == 0) { log("Deleting " + dir.getAbsolutePath(), verbosity); if (!dir.delete()) { String message="Unable to delete directory " + dir.getAbsolutePath(); if(failonerror) throw new BuildException(message); else log(message, quiet ? Project.MSG_VERBOSE : Project.MSG_WARN); } else { dirCount++; } } } if (dirCount > 0) { log("Deleted " + dirCount + " director" + (dirCount==1 ? "y" : "ies") + " from " + d.getAbsolutePath()); } } } | 506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/506/130315b576401682fedfa9655c790b8380955177/Delete.java/buggy/src/main/org/apache/tools/ant/taskdefs/Delete.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1206,
2697,
12,
812,
302,
16,
514,
8526,
1390,
16,
514,
8526,
7717,
13,
288,
3639,
309,
261,
2354,
18,
2469,
405,
374,
13,
288,
5411,
613,
2932,
20433,
315,
397,
1390,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
1206,
2697,
12,
812,
302,
16,
514,
8526,
1390,
16,
514,
8526,
7717,
13,
288,
3639,
309,
261,
2354,
18,
2469,
405,
374,
13,
288,
5411,
613,
2932,
20433,
315,
397,
1390,
18,
... |
applyTo(generalSettings); | final ClassRenderer classRenderer = NodeRendererSettings.getInstance().getClassRenderer(); classRenderer.SORT_ASCENDING = mySortCheckBox.isSelected(); classRenderer.SHOW_STATIC = myShowStaticCheckBox.isSelected(); classRenderer.SHOW_STATIC_FINAL = myShowStaticFinalCheckBox.isSelectedWhenSelectable(); classRenderer.SHOW_SYNTHETICS = myShowSyntheticsCheckBox.isSelected(); | public void apply() { if (myPanel != null) { ViewsGeneralSettings generalSettings = ViewsGeneralSettings.getInstance(); applyTo(generalSettings); myArrayRendererConfigurable.apply(); generalSettings.fireRendererSettingsChanged(); } } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/bfe82dc83a75d544fa3ff4054e33414a2a195961/ViewsGeneralConfigurable.java/clean/source/com/intellij/debugger/settings/ViewsGeneralConfigurable.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2230,
1435,
288,
565,
309,
261,
4811,
5537,
480,
446,
13,
288,
1377,
31117,
12580,
2628,
7470,
2628,
273,
31117,
12580,
2628,
18,
588,
1442,
5621,
1377,
727,
1659,
6747,
667,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2230,
1435,
288,
565,
309,
261,
4811,
5537,
480,
446,
13,
288,
1377,
31117,
12580,
2628,
7470,
2628,
273,
31117,
12580,
2628,
18,
588,
1442,
5621,
1377,
727,
1659,
6747,
667,
6... |
public final void RRD (int i, String op, byte R0, byte R1, int d) { | public final void RRD (int i, String op, byte R0, byte R1, Offset d) { | public final void RRD (int i, String op, byte R0, byte R1, int d) { i = begin(i, op); VM.sysWrite(right(isFP(op)?FPR_NAMES[R0]:GPR_NAMES[R0] + " ", DEST_AREA_SIZE)); VM.sysWrite(right(decimal(d) + "[" + GPR_NAMES[R1] + "]", SOURCE_AREA_SIZE)); end(i); } | 5245 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5245/c19269673fcdd14e39a92c30e8ccef4cb7ce0402/VM_Lister.java/clean/rvm/src/vm/arch/intel/assembler/VM_Lister.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
534,
20403,
261,
474,
277,
16,
514,
1061,
16,
1160,
534,
20,
16,
1160,
534,
21,
16,
9874,
302,
13,
288,
565,
277,
273,
2376,
12,
77,
16,
1061,
1769,
565,
8251,
18,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
918,
534,
20403,
261,
474,
277,
16,
514,
1061,
16,
1160,
534,
20,
16,
1160,
534,
21,
16,
9874,
302,
13,
288,
565,
277,
273,
2376,
12,
77,
16,
1061,
1769,
565,
8251,
18,
9... |
Log log = logFactory.getInstance(Project.class); | String categoryString= "org.apache.tools.ant.Project"; Log log=getLog(categoryString, event.getProject().getName()); | public void buildFinished(BuildEvent event) { if (initialized) { Log log = logFactory.getInstance(Project.class); if (event.getException() == null) { log.info("Build finished."); } else { log.error("Build finished with error.", event.getException()); } } } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/988ec061641b11cce372f8d85e12aa9f0134a8ae/CommonsLoggingListener.java/buggy/src/main/org/apache/tools/ant/listener/CommonsLoggingListener.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1361,
10577,
12,
3116,
1133,
871,
13,
288,
3639,
309,
261,
13227,
13,
288,
5411,
514,
3150,
780,
33,
315,
3341,
18,
19211,
18,
6642,
18,
970,
18,
4109,
14432,
1827,
613,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1361,
10577,
12,
3116,
1133,
871,
13,
288,
3639,
309,
261,
13227,
13,
288,
5411,
514,
3150,
780,
33,
315,
3341,
18,
19211,
18,
6642,
18,
970,
18,
4109,
14432,
1827,
613,
33,
... |
public PCLRenderer() { } | public PCLRenderer() { } | public PCLRenderer() { } | 5268 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5268/cd264ba6a67a155375a4ba85cdb6dc35503ef593/PCLRenderer.java/buggy/src/org/apache/fop/render/pcl/PCLRenderer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
30962,
6747,
1435,
202,
95,
202,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
30962,
6747,
1435,
202,
95,
202,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
posts.addAll(Arrays.asList(space.match(start, end))); Collections.sort(posts, comparator); | public List getPosts(int count) { // simpledateformat? Calendar startC = new GregorianCalendar(); startC.setTime(new java.util.Date()); Calendar endC = (Calendar)startC.clone(); endC.add(Calendar.DAY_OF_MONTH, 1); startC.add(Calendar.MONTH, -3); String start = name + "/" + Month.toKey(startC) + "/"; String end = name + "/" + Month.toKey(endC) + "/"; //@TODO: reduce number of posts to count; //@TODO: reorder snips //List posts = new ArrayList(); //space.getChildrenDateOrder(blog, count); List posts = new ArrayList(); posts.addAll(Arrays.asList(space.match(start, end))); Collections.sort(posts, comparator); // sort // Add old snips of form '2005-03-01' if name == 'start' if (posts.size() < count && name.equals(startName)) { List oldPosts = space.getByDate(Month.toKey(startC), Month.toKey(endC)); Collections.sort(oldPosts, comparator); oldPosts = oldPosts.subList(0, Math.min(oldPosts.size(), count - posts.size())); posts.addAll(oldPosts); } return posts.subList(0, Math.min(posts.size(), count)); } | 6853 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6853/0d77b95815706dfa205717c519f132dd90c08e68/BlogImpl.java/buggy/src/org/snipsnap/snip/BlogImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
987,
14150,
87,
12,
474,
1056,
13,
288,
565,
368,
4143,
712,
2139,
35,
565,
5542,
787,
39,
273,
394,
28033,
5621,
565,
787,
39,
18,
542,
950,
12,
2704,
2252,
18,
1367,
18,
1626,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
987,
14150,
87,
12,
474,
1056,
13,
288,
565,
368,
4143,
712,
2139,
35,
565,
5542,
787,
39,
273,
394,
28033,
5621,
565,
787,
39,
18,
542,
950,
12,
2704,
2252,
18,
1367,
18,
1626,... | |
public HashMap getChainExecutionsByChainID() { | public LinkedHashMap getChainExecutionsByChainID() { | public HashMap getChainExecutionsByChainID() { return executionsByChain; } | 13273 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13273/426d81c49168655739bbc20b40625063012871e0/ChainExecutionsLoadedEvent.java/clean/SRC/org/openmicroscopy/shoola/agents/events/ChainExecutionsLoadedEvent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13589,
30170,
15875,
858,
3893,
734,
1435,
288,
377,
202,
202,
2463,
26845,
858,
3893,
31,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
13589,
30170,
15875,
858,
3893,
734,
1435,
288,
377,
202,
202,
2463,
26845,
858,
3893,
31,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
public org.quickfix.field.AccountType getAccountType() throws FieldNotFound { org.quickfix.field.AccountType value = new org.quickfix.field.AccountType(); | public quickfix.field.AccountType getAccountType() throws FieldNotFound { quickfix.field.AccountType value = new quickfix.field.AccountType(); | public org.quickfix.field.AccountType getAccountType() throws FieldNotFound { org.quickfix.field.AccountType value = new org.quickfix.field.AccountType(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/QuoteCancel.java/clean/src/java/src/quickfix/fix43/QuoteCancel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
3032,
559,
23393,
559,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
3032,
559,
460,
273,
394,
2358,
18,
19525,
904,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
3032,
559,
23393,
559,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
3032,
559,
460,
273,
394,
2358,
18,
19525,
904,
18... |
cat = new BugzillaQueryCategory(element.getAttribute(NAME), element.getAttribute(QUERY_STRING), element | cat = new BugzillaQueryCategory(element.getAttribute(REPOSITORY_URL), element.getAttribute(QUERY_STRING), element.getAttribute(NAME), element | public void readQuery(Node node, TaskList tlist) throws TaskListExternalizerException { boolean hasCaughtException = false; Element element = (Element) node; ITaskQuery cat = null; if (node.getNodeName().equals(TAG_BUGZILLA_CUSTOM_QUERY)) { cat = new BugzillaCustomQueryCategory(element.getAttribute(NAME), element.getAttribute(QUERY_STRING), element .getAttribute(MAX_HITS)); } else if (node.getNodeName().equals(TAG_BUGZILLA_QUERY)) { cat = new BugzillaQueryCategory(element.getAttribute(NAME), element.getAttribute(QUERY_STRING), element .getAttribute(MAX_HITS)); } if (cat != null) { tlist.internalAddQuery(cat); } NodeList list = node.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node child = list.item(i); try { readQueryHit(child, tlist, cat); } catch (TaskListExternalizerException e) { hasCaughtException = true; } } if (hasCaughtException) throw new TaskListExternalizerException("Failed to load all tasks"); } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/832f772c9bfbe1db8eeb7662bd96232584598cee/BugzillaTaskExternalizer.java/buggy/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
855,
1138,
12,
907,
756,
16,
3837,
682,
268,
1098,
13,
1216,
3837,
682,
6841,
1824,
503,
288,
202,
202,
6494,
711,
24512,
503,
273,
629,
31,
202,
202,
1046,
930,
273,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
855,
1138,
12,
907,
756,
16,
3837,
682,
268,
1098,
13,
1216,
3837,
682,
6841,
1824,
503,
288,
202,
202,
6494,
711,
24512,
503,
273,
629,
31,
202,
202,
1046,
930,
273,
2... |
logger.debug("Received nonce is " + SerialConnector.byteArrayToString(receivedNonce)); | logger.debug("Received nonce is " + SerialConnector.byteArrayToBinaryString(receivedNonce)); | private void handleCompleteProtocol() throws InternalApplicationException, DongleAuthenticationProtocolException { // first create the local nonce SecureRandom r = new SecureRandom(); byte[] nonce = new byte[16]; r.nextBytes(nonce); logger.info("Starting authentication protocol with remote dongle " + remoteRelateId); logger.debug("My shared authentication key is " + SerialConnector.byteArrayToString(sharedKey)); logger.debug("My nonce is " + SerialConnector.byteArrayToString(nonce)); // need to specifically request no padding or padding would enlarge the one 128 bits block to two try { Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding"); cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(sharedKey, "AES")); byte[] rfMessage = cipher.doFinal(nonce); if (rfMessage.length != 16) { logger.error("Encryption went wrong, got " + rfMessage.length + " bytes"); raiseAuthenticationFailureEvent(new Integer(remoteRelateId), null, "Encryption went wrong, got " + rfMessage.length + " bytes instead of 16."); return; } logger.debug("My RF packet is " + SerialConnector.byteArrayToString(rfMessage)); raiseAuthenticationProgressEvent(new Integer(remoteRelateId), 1, AuthenticationStages + rounds, "Encrypted nonce"); byte[] receivedDelays = new byte[16], receivedRfMessage = new byte[16]; if (!handleDongleCommunication(nonce, rfMessage, rounds, receivedDelays, receivedRfMessage)) { raiseAuthenticationFailureEvent(new Integer(remoteRelateId), null, "Dongle authentication protocol failed"); return; } logger.debug("Received RF packet is " + SerialConnector.byteArrayToString(receivedRfMessage)); logger.debug("Received delays have been concatenated to " + SerialConnector.byteArrayToString(receivedDelays)); // check that the delays match the (encrypted) message sent by the remote cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(sharedKey, "AES")); byte[] receivedNonce = cipher.doFinal(receivedRfMessage); logger.debug("Received nonce is " + SerialConnector.byteArrayToString(receivedNonce)); raiseAuthenticationProgressEvent(new Integer(remoteRelateId), 3 + rounds, AuthenticationStages + rounds, "Decrypted remote message"); // the lower bits must match if (compareBits(receivedNonce, receivedDelays, EntropyBitsPerRound * rounds)) raiseAuthenticationSuccessEvent(new Integer(remoteRelateId), null); else raiseAuthenticationFailureEvent(new Integer(remoteRelateId), null, "Ultrasound delays do not match received nonce"); } catch (NoSuchAlgorithmException e) { throw new InternalApplicationException( "Unable to get cipher object from crypto provider.", e); } catch (NoSuchPaddingException e) { throw new InternalApplicationException( "Unable to get requested padding from crypto provider.", e); } catch (InvalidKeyException e) { throw new InternalApplicationException( "Cipher does not accept its key.", e); } catch (IllegalBlockSizeException e) { throw new InternalApplicationException( "Cipher does not accept requested block size.", e); } catch (BadPaddingException e) { throw new InternalApplicationException( "Cipher does not accept requested padding.", e); } } | 14316 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14316/e31b9d8dbd396cf0c255032c6791e38006a88287/DongleProtocolHandler.java/buggy/src/java/RelateAuthentication/src/org/eu/mayrhofer/authentication/DongleProtocolHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1640,
6322,
5752,
1435,
1216,
3186,
3208,
503,
16,
463,
932,
298,
6492,
5752,
503,
288,
202,
202,
759,
1122,
752,
326,
1191,
7448,
3639,
15653,
8529,
436,
273,
394,
15653,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1640,
6322,
5752,
1435,
1216,
3186,
3208,
503,
16,
463,
932,
298,
6492,
5752,
503,
288,
202,
202,
759,
1122,
752,
326,
1191,
7448,
3639,
15653,
8529,
436,
273,
394,
15653,... |
PluginLog.getLog().info("Finished configuring web.xml"); | PluginLog.getLog().debug("Finished configuring web.xml"); | public void configureWebApp() throws Exception { //cannot configure if the context is already started if (getWebAppContext().isStarted()) { PluginLog.getLog().info("Cannot configure webapp after it is started"); return; } PluginLog.getLog().info("Started configuring web.xml, resource base="+webAppDir.getCanonicalPath()); getWebAppContext().setResourceBase(webAppDir.getCanonicalPath()); if (webXmlFile.exists()) configure(webXmlFile.toURL().toString()); PluginLog.getLog().info("Finished configuring web.xml"); } | 13242 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13242/0440dcbdbcd5234fb15a4db7b46bb3f48793fe17/Jetty6MavenConfiguration.java/buggy/trunk/modules/maven-plugin/src/main/java/org/mortbay/jetty/plugin/Jetty6MavenConfiguration.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5068,
4079,
3371,
1435,
1216,
1185,
377,
288,
3639,
368,
12892,
5068,
309,
326,
819,
353,
1818,
5746,
3639,
309,
261,
588,
4079,
3371,
1042,
7675,
291,
9217,
10756,
3639,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
5068,
4079,
3371,
1435,
1216,
1185,
377,
288,
3639,
368,
12892,
5068,
309,
326,
819,
353,
1818,
5746,
3639,
309,
261,
588,
4079,
3371,
1042,
7675,
291,
9217,
10756,
3639,
288,
... |
{ firstWarning = null; if (info.getProperty("user") == null) throw new PSQLException("postgresql.con.user"); this_driver = d; this_url = url; PG_DATABASE = database; PG_USER = info.getProperty("user"); String password = info.getProperty("password", ""); PG_PORT = port; PG_HOST = host; PG_STATUS = CONNECTION_BAD; if (info.getProperty("compatible") == null) { compatible = d.getMajorVersion() + "." + d.getMinorVersion(); } else { compatible = info.getProperty("compatible"); } try { pg_stream = new PG_Stream(host, port); } catch (ConnectException cex) { throw new PSQLException ("postgresql.con.refused"); } catch (IOException e) { throw new PSQLException ("postgresql.con.failed", e); } try { new StartupPacket(PG_PROTOCOL_LATEST_MAJOR, PG_PROTOCOL_LATEST_MINOR, PG_USER, database).writeTo(pg_stream); pg_stream.flush(); int areq = -1; do { int beresp = pg_stream.ReceiveChar(); String salt = null; switch (beresp) { case 'E': throw new PSQLException("postgresql.con.misc", pg_stream.ReceiveString(encoding)); case 'R': areq = pg_stream.ReceiveIntegerR(4); if (areq == AUTH_REQ_CRYPT) { byte[] rst = new byte[2]; rst[0] = (byte)pg_stream.ReceiveChar(); rst[1] = (byte)pg_stream.ReceiveChar(); salt = new String(rst, 0, 2); DriverManager.println("Crypt salt=" + salt); } if (areq == AUTH_REQ_MD5) { byte[] rst = new byte[4]; rst[0] = (byte)pg_stream.ReceiveChar(); rst[1] = (byte)pg_stream.ReceiveChar(); rst[2] = (byte)pg_stream.ReceiveChar(); rst[3] = (byte)pg_stream.ReceiveChar(); salt = new String(rst, 0, 4); DriverManager.println("MD5 salt=" + salt); } switch (areq) { case AUTH_REQ_OK: break; case AUTH_REQ_KRB4: DriverManager.println("postgresql: KRB4"); throw new PSQLException("postgresql.con.kerb4"); case AUTH_REQ_KRB5: DriverManager.println("postgresql: KRB5"); throw new PSQLException("postgresql.con.kerb5"); case AUTH_REQ_PASSWORD: DriverManager.println("postgresql: PASSWORD"); pg_stream.SendInteger(5 + password.length(), 4); pg_stream.Send(password.getBytes()); pg_stream.SendInteger(0, 1); pg_stream.flush(); break; case AUTH_REQ_CRYPT: DriverManager.println("postgresql: CRYPT"); String crypted = UnixCrypt.crypt(salt, password); pg_stream.SendInteger(5 + crypted.length(), 4); pg_stream.Send(crypted.getBytes()); pg_stream.SendInteger(0, 1); pg_stream.flush(); break; case AUTH_REQ_MD5: DriverManager.println("postgresql: MD5"); byte[] digest = MD5Digest.encode(PG_USER, password, salt); pg_stream.SendInteger(5 + digest.length, 4); pg_stream.Send(digest); pg_stream.SendInteger(0, 1); pg_stream.flush(); break; default: throw new PSQLException("postgresql.con.auth", new Integer(areq)); } break; default: throw new PSQLException("postgresql.con.authfail"); } } while (areq != AUTH_REQ_OK); } catch (IOException e) { throw new PSQLException("postgresql.con.failed", e); } int beresp = pg_stream.ReceiveChar(); switch (beresp) { case 'K': pid = pg_stream.ReceiveIntegerR(4); ckey = pg_stream.ReceiveIntegerR(4); break; case 'E': throw new PSQLException("postgresql.con.backend", pg_stream.ReceiveString(encoding)); case 'N': addWarning(pg_stream.ReceiveString(encoding)); break; default: throw new PSQLException("postgresql.con.setup"); } beresp = pg_stream.ReceiveChar(); switch (beresp) { case 'Z': break; case 'E': throw new PSQLException("postgresql.con.backend", pg_stream.ReceiveString(encoding)); default: throw new PSQLException("postgresql.con.setup"); } final String encodingQuery = "case when pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end"; java.sql.ResultSet resultSet = ExecSQL("set datestyle to 'ISO'; select version(), " + encodingQuery + ";"); if (! resultSet.next()) { throw new PSQLException("postgresql.con.failed", "failed getting backend encoding"); } String version = resultSet.getString(1); dbVersionNumber = extractVersionNumber(version); String dbEncoding = resultSet.getString(2); encoding = Encoding.getEncoding(dbEncoding, info.getProperty("charSet")); initObjectTypes(); PG_STATUS = CONNECTION_OK; } | { firstWarning = null; if (info.getProperty("user") == null) throw new PSQLException("postgresql.con.user"); this_driver = d; this_url = url; PG_DATABASE = database; PG_USER = info.getProperty("user"); String password = info.getProperty("password", ""); PG_PORT = port; PG_HOST = host; PG_STATUS = CONNECTION_BAD; if (info.getProperty("compatible") == null) { compatible = d.getMajorVersion() + "." + d.getMinorVersion(); } else { compatible = info.getProperty("compatible"); } try { pg_stream = new PG_Stream(host, port); } catch (ConnectException cex) { throw new PSQLException ("postgresql.con.refused"); } catch (IOException e) { throw new PSQLException ("postgresql.con.failed", e); } try { new StartupPacket(PG_PROTOCOL_LATEST_MAJOR, PG_PROTOCOL_LATEST_MINOR, PG_USER, database).writeTo(pg_stream); pg_stream.flush(); int areq = -1; do { int beresp = pg_stream.ReceiveChar(); String salt = null; switch (beresp) { case 'E': throw new PSQLException("postgresql.con.misc", pg_stream.ReceiveString(encoding)); case 'R': areq = pg_stream.ReceiveIntegerR(4); if (areq == AUTH_REQ_CRYPT) { byte[] rst = new byte[2]; rst[0] = (byte)pg_stream.ReceiveChar(); rst[1] = (byte)pg_stream.ReceiveChar(); salt = new String(rst, 0, 2); Driver.debug("Crypt salt=" + salt); } if (areq == AUTH_REQ_MD5) { byte[] rst = new byte[4]; rst[0] = (byte)pg_stream.ReceiveChar(); rst[1] = (byte)pg_stream.ReceiveChar(); rst[2] = (byte)pg_stream.ReceiveChar(); rst[3] = (byte)pg_stream.ReceiveChar(); salt = new String(rst, 0, 4); Driver.debug("MD5 salt=" + salt); } switch (areq) { case AUTH_REQ_OK: break; case AUTH_REQ_KRB4: Driver.debug("postgresql: KRB4"); throw new PSQLException("postgresql.con.kerb4"); case AUTH_REQ_KRB5: Driver.debug("postgresql: KRB5"); throw new PSQLException("postgresql.con.kerb5"); case AUTH_REQ_PASSWORD: Driver.debug("postgresql: PASSWORD"); pg_stream.SendInteger(5 + password.length(), 4); pg_stream.Send(password.getBytes()); pg_stream.SendInteger(0, 1); pg_stream.flush(); break; case AUTH_REQ_CRYPT: Driver.debug("postgresql: CRYPT"); String crypted = UnixCrypt.crypt(salt, password); pg_stream.SendInteger(5 + crypted.length(), 4); pg_stream.Send(crypted.getBytes()); pg_stream.SendInteger(0, 1); pg_stream.flush(); break; case AUTH_REQ_MD5: Driver.debug("postgresql: MD5"); byte[] digest = MD5Digest.encode(PG_USER, password, salt); pg_stream.SendInteger(5 + digest.length, 4); pg_stream.Send(digest); pg_stream.SendInteger(0, 1); pg_stream.flush(); break; default: throw new PSQLException("postgresql.con.auth", new Integer(areq)); } break; default: throw new PSQLException("postgresql.con.authfail"); } } while (areq != AUTH_REQ_OK); } catch (IOException e) { throw new PSQLException("postgresql.con.failed", e); } int beresp; do { beresp = pg_stream.ReceiveChar(); switch (beresp) { case 'K': pid = pg_stream.ReceiveIntegerR(4); ckey = pg_stream.ReceiveIntegerR(4); break; case 'E': throw new PSQLException("postgresql.con.backend", pg_stream.ReceiveString(encoding)); case 'N': addWarning(pg_stream.ReceiveString(encoding)); break; default: throw new PSQLException("postgresql.con.setup"); } } while (beresp == 'N'); do { beresp = pg_stream.ReceiveChar(); switch (beresp) { case 'Z': break; case 'N': addWarning(pg_stream.ReceiveString(encoding)); break; case 'E': throw new PSQLException("postgresql.con.backend", pg_stream.ReceiveString(encoding)); default: throw new PSQLException("postgresql.con.setup"); } } while (beresp == 'N'); final String encodingQuery = "case when pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end"; java.sql.ResultSet resultSet = ExecSQL("set datestyle to 'ISO'; select version(), " + encodingQuery + ";"); if (! resultSet.next()) { throw new PSQLException("postgresql.con.failed", "failed getting backend encoding"); } String version = resultSet.getString(1); dbVersionNumber = extractVersionNumber(version); String dbEncoding = resultSet.getString(2); encoding = Encoding.getEncoding(dbEncoding, info.getProperty("charSet")); initObjectTypes(); PG_STATUS = CONNECTION_OK; } | protected void openConnection(String host, int port, Properties info, String database, String url, Driver d) throws SQLException { firstWarning = null; // Throw an exception if the user or password properties are missing // This occasionally occurs when the client uses the properties version // of getConnection(), and is a common question on the email lists if (info.getProperty("user") == null) throw new PSQLException("postgresql.con.user"); this_driver = d; this_url = url; PG_DATABASE = database; PG_USER = info.getProperty("user"); String password = info.getProperty("password", ""); PG_PORT = port; PG_HOST = host; PG_STATUS = CONNECTION_BAD; if (info.getProperty("compatible") == null) { compatible = d.getMajorVersion() + "." + d.getMinorVersion(); } else { compatible = info.getProperty("compatible"); } // Now make the initial connection try { pg_stream = new PG_Stream(host, port); } catch (ConnectException cex) { // Added by Peter Mount <peter@retep.org.uk> // ConnectException is thrown when the connection cannot be made. // we trap this an return a more meaningful message for the end user throw new PSQLException ("postgresql.con.refused"); } catch (IOException e) { throw new PSQLException ("postgresql.con.failed", e); } // Now we need to construct and send a startup packet try { new StartupPacket(PG_PROTOCOL_LATEST_MAJOR, PG_PROTOCOL_LATEST_MINOR, PG_USER, database).writeTo(pg_stream); // now flush the startup packets to the backend pg_stream.flush(); // Now get the response from the backend, either an error message // or an authentication request int areq = -1; // must have a value here do { int beresp = pg_stream.ReceiveChar(); String salt = null; switch (beresp) { case 'E': // An error occured, so pass the error message to the // user. // // The most common one to be thrown here is: // "User authentication failed" // throw new PSQLException("postgresql.con.misc", pg_stream.ReceiveString(encoding)); case 'R': // Get the type of request areq = pg_stream.ReceiveIntegerR(4); // Get the crypt password salt if there is one if (areq == AUTH_REQ_CRYPT) { byte[] rst = new byte[2]; rst[0] = (byte)pg_stream.ReceiveChar(); rst[1] = (byte)pg_stream.ReceiveChar(); salt = new String(rst, 0, 2); DriverManager.println("Crypt salt=" + salt); } // Or get the md5 password salt if there is one if (areq == AUTH_REQ_MD5) { byte[] rst = new byte[4]; rst[0] = (byte)pg_stream.ReceiveChar(); rst[1] = (byte)pg_stream.ReceiveChar(); rst[2] = (byte)pg_stream.ReceiveChar(); rst[3] = (byte)pg_stream.ReceiveChar(); salt = new String(rst, 0, 4); DriverManager.println("MD5 salt=" + salt); } // now send the auth packet switch (areq) { case AUTH_REQ_OK: break; case AUTH_REQ_KRB4: DriverManager.println("postgresql: KRB4"); throw new PSQLException("postgresql.con.kerb4"); case AUTH_REQ_KRB5: DriverManager.println("postgresql: KRB5"); throw new PSQLException("postgresql.con.kerb5"); case AUTH_REQ_PASSWORD: DriverManager.println("postgresql: PASSWORD"); pg_stream.SendInteger(5 + password.length(), 4); pg_stream.Send(password.getBytes()); pg_stream.SendInteger(0, 1); pg_stream.flush(); break; case AUTH_REQ_CRYPT: DriverManager.println("postgresql: CRYPT"); String crypted = UnixCrypt.crypt(salt, password); pg_stream.SendInteger(5 + crypted.length(), 4); pg_stream.Send(crypted.getBytes()); pg_stream.SendInteger(0, 1); pg_stream.flush(); break; case AUTH_REQ_MD5: DriverManager.println("postgresql: MD5"); byte[] digest = MD5Digest.encode(PG_USER, password, salt); pg_stream.SendInteger(5 + digest.length, 4); pg_stream.Send(digest); pg_stream.SendInteger(0, 1); pg_stream.flush(); break; default: throw new PSQLException("postgresql.con.auth", new Integer(areq)); } break; default: throw new PSQLException("postgresql.con.authfail"); } } while (areq != AUTH_REQ_OK); } catch (IOException e) { throw new PSQLException("postgresql.con.failed", e); } // As of protocol version 2.0, we should now receive the cancellation key and the pid int beresp = pg_stream.ReceiveChar(); switch (beresp) { case 'K': pid = pg_stream.ReceiveIntegerR(4); ckey = pg_stream.ReceiveIntegerR(4); break; case 'E': throw new PSQLException("postgresql.con.backend", pg_stream.ReceiveString(encoding)); case 'N': addWarning(pg_stream.ReceiveString(encoding)); break; default: throw new PSQLException("postgresql.con.setup"); } // Expect ReadyForQuery packet beresp = pg_stream.ReceiveChar(); switch (beresp) { case 'Z': break; case 'E': throw new PSQLException("postgresql.con.backend", pg_stream.ReceiveString(encoding)); default: throw new PSQLException("postgresql.con.setup"); } // "pg_encoding_to_char(1)" will return 'EUC_JP' for a backend compiled with multibyte, // otherwise it's hardcoded to 'SQL_ASCII'. // If the backend doesn't know about multibyte we can't assume anything about the encoding // used, so we denote this with 'UNKNOWN'. //Note: begining with 7.2 we should be using pg_client_encoding() which //is new in 7.2. However it isn't easy to conditionally call this new //function, since we don't yet have the information as to what server //version we are talking to. Thus we will continue to call //getdatabaseencoding() until we drop support for 7.1 and older versions //or until someone comes up with a conditional way to run one or //the other function depending on server version that doesn't require //two round trips to the server per connection final String encodingQuery = "case when pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end"; // Set datestyle and fetch db encoding in a single call, to avoid making // more than one round trip to the backend during connection startup. java.sql.ResultSet resultSet = ExecSQL("set datestyle to 'ISO'; select version(), " + encodingQuery + ";"); if (! resultSet.next()) { throw new PSQLException("postgresql.con.failed", "failed getting backend encoding"); } String version = resultSet.getString(1); dbVersionNumber = extractVersionNumber(version); String dbEncoding = resultSet.getString(2); encoding = Encoding.getEncoding(dbEncoding, info.getProperty("charSet")); // Initialise object handling initObjectTypes(); // Mark the connection as ok, and cleanup PG_STATUS = CONNECTION_OK; } | 2413 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2413/64973bfd2fca3a7c6badcc77d939c73f79b8f6bc/Connection.java/buggy/org/postgresql/Connection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
24982,
12,
780,
1479,
16,
509,
1756,
16,
6183,
1123,
16,
514,
2063,
16,
514,
880,
16,
9396,
302,
13,
1216,
6483,
202,
95,
202,
202,
3645,
6210,
273,
446,
31,
202,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
24982,
12,
780,
1479,
16,
509,
1756,
16,
6183,
1123,
16,
514,
2063,
16,
514,
880,
16,
9396,
302,
13,
1216,
6483,
202,
95,
202,
202,
3645,
6210,
273,
446,
31,
202,
202,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.