auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testFastTransformArguments() { List<IllegalArgumentException> exc = new ArrayList<>(); double[] slopes = new double[] { -1.0, ((double)Integer.MAX_VALUE) + 1, 1e-10 }; for (double slope: slopes) { try { <START> System.out.println(slope); <END> new TmfTimestampTransformLinearFast(slope, 0.0); } catch (IllegalArgumentException e) { exc.add(e); } } System.out.println(exc); assertEquals(3, exc.size()); }</code><technical_language>Remove System.out.println code</technical_language>

Target:
public void testFastTransformArguments() { List<IllegalArgumentException> exc = new ArrayList<>(); double[] slopes = new double[] { -1.0, ((double)Integer.MAX_VALUE) + 1, 1e-10 }; for (double slope: slopes) { try { new TmfTimestampTransformLinearFast(slope, 0.0); } catch (IllegalArgumentException e) { exc.add(e); } } assertEquals(3, exc.size()); }
Source:
<code>void registerCapability(RegistrationParams params) { params.getRegistrations().forEach(reg -> { if ("workspace/didChangeWorkspaceFolders".equals(reg.getMethod())) { <START> supportWorkspaceFoldersCapability = true; <END> } else if ("workspace/executeCommand".equals(reg.getMethod())) { Gson gson = new Gson(); ExecuteCommandOptions executeCommandOptions = gson.fromJson((JsonObject) reg.getRegisterOptions(), ExecuteCommandOptions.class); List<String> newCommands = executeCommandOptions.getCommands(); if (!newCommands.isEmpty()) { registerCommands(newCommands); String regId = reg.getId(); synchronized (dynamicRegistrations) { Assert.isLegal(!dynamicRegistrations.containsKey(regId)); dynamicRegistrations.put(regId, () -> { unregisterCommands(newCommands); }); } } } }); }</code><technical_language>please this block contribute dynamicRegistration map</technical_language>

Target:
void registerCapability(RegistrationParams params) { params.getRegistrations().forEach(reg -> { if ("workspace/didChangeWorkspaceFolders".equals(reg.getMethod())) { Assert.isNotNull(serverCapabilities, "Dynamic capability registration failed! Server not yet initialized?"); Assert.isLegal(!supportsWorkspaceFolders(serverCapabilities), "Can't enable workspaceFolders dynamically because it was already enabled on initialization"); onUnregistration(reg, () -> enableWorkspaceFolders(serverCapabilities, false)); enableWorkspaceFolders(serverCapabilities, true); } else if ("workspace/executeCommand".equals(reg.getMethod())) { Gson gson = new Gson(); ExecuteCommandOptions executeCommandOptions = gson.fromJson((JsonObject) reg.getRegisterOptions(), ExecuteCommandOptions.class); List<String> newCommands = executeCommandOptions.getCommands(); if (!newCommands.isEmpty()) { onUnregistration(reg, () -> unregisterCommands(newCommands)); registerCommands(newCommands); } } }); }
Source:
<code><START> public PlannedServiceBundle(){ <END> plannedItems = new ArrayList<>(); orgUnits = new ArrayList<>(); programs = new ArrayList<>(); }</code><technical_language>@idelcano I this constructor is needed (unless thinking adding else on). initialise variables. variables private if getter/setter</technical_language>

Target:
public PlannedServiceBundle(){ }
Source:
<code>public static final SmsManager getDefault() { <START> return new SmsManager(); <END> }</code><technical_language>Any reason this a singleton? ie, sInstance, construct if sInstance==null. -- This issue is fixed in patch3</technical_language>

Target:
public static final SmsManager getDefault() { if (sInstance == null) { sInstance = new SmsManager(); } return sInstance; }
Source:
<code>private boolean hardDelete() throws StoreException { if (indexes.size() > 0) { final Timer.Context context = metrics.hardDeleteTime.time(); try { FindInfo info = findDeletedEntriesSince(startToken, scanSizeInBytes, SystemTime.getInstance().seconds() - messageRetentionSeconds); endToken = info.getFindToken(); <START> pruneHardDeleteRecoveryRange(); <END> if (!endToken.equals(startToken)) { if (!info.getMessageEntries().isEmpty()) { performHardDeletes(info.getMessageEntries()); } startToken = endToken; return true; } } catch (StoreException e) { if (e.getErrorCode() != StoreErrorCodes.Store_Shutting_Down) { metrics.hardDeleteExceptionsCount.inc(); } throw e; } finally { context.stop(); } } return false; }</code><technical_language>I dont understand pruning is done this point. knowledge harddeleterecoveryrange is populated performHardDeletes() is called this method. shed some light if I missing priyesh</technical_language>

Target:
protected boolean hardDelete() throws StoreException { if (indexes.size() > 0) { final Timer.Context context = metrics.hardDeleteTime.time(); try { FindInfo info = findDeletedEntriesSince(startToken, scanSizeInBytes, time.seconds() - messageRetentionSeconds); endToken = info.getFindToken(); pruneHardDeleteRecoveryRange(); if (!endToken.equals(startToken)) { if (!info.getMessageEntries().isEmpty()) { performHardDeletes(info.getMessageEntries()); } startToken = endToken; return true; } } catch (StoreException e) { if (e.getErrorCode() != StoreErrorCodes.Store_Shutting_Down) { metrics.hardDeleteExceptionsCount.inc(); } throw e; } finally { context.stop(); } } return false; }
Source:
<code>private String getResult(RefUpdateElement element) { <START> StringBuffer result = new StringBuffer(EMPTY_STRING); <END> PushOperationResult pushOperationResult = element .getPushOperationResult(); Set<URIish> urIs = pushOperationResult.getURIs(); for (URIish uri : urIs) { result.append(UIText.PushResultTable_repository); result.append(SPACE); result.append(uri.toString()); result.append(NEWLINE); result.append(NEWLINE); String message = element.getRemoteRefUpdate(uri).getMessage(); if (message != null) { result.append(message); result.append(NEWLINE); } StringBuffer messagesBuffer = new StringBuffer(pushOperationResult .getPushResult(uri).getMessages()); trim(messagesBuffer); result.append(messagesBuffer); } return result.toString(); }</code><technical_language>StringBuilder instead</technical_language>

Target:
private String getResult(RefUpdateElement element) { StringBuilder result = new StringBuilder(EMPTY_STRING); PushOperationResult pushOperationResult = element .getPushOperationResult(); Set<URIish> urIs = pushOperationResult.getURIs(); Iterator<URIish> iterator = urIs.iterator(); while(iterator.hasNext()) { boolean lineBreakNeeded = false; URIish uri = iterator.next(); result.append(UIText.PushResultTable_repository); result.append(SPACE); result.append(uri.toString()); result.append(Text.DELIMITER); result.append(Text.DELIMITER); String message = element.getRemoteRefUpdate(uri).getMessage(); if (message != null) { result.append(message); result.append(Text.DELIMITER); lineBreakNeeded = true; } StringBuilder messagesBuffer = new StringBuilder(pushOperationResult .getPushResult(uri).getMessages()); trim(messagesBuffer); if (messagesBuffer.length()>0) { result.append(messagesBuffer); result.append(Text.DELIMITER); lineBreakNeeded = true; } if (iterator.hasNext() && lineBreakNeeded) result.append(Text.DELIMITER); } trim(result); return result.toString(); }
Source:
<code>private <T> T runWithHandle(ThrowingSupplier<T> supplier) throws TException { try { T t = supplier.get(); <START> responseHandle.success(); <END> return t; } catch (TException e) { responseHandle.failed(e); throw e; } }</code><technical_language>nit: move this catch, .success() failure trigger failed() T t; try { t = supplier.get(); } catch (TException e) { responseHandle.failed(e); throw e; } responseHandle.success(); return t;</technical_language>

Target:
private <T> T runWithHandle(ThrowingSupplier<T> supplier) throws TException { T t; try { t = supplier.get(); } catch (TException e) { responseHandle.failed(e); throw e; } responseHandle.success(); return t; }
Source:
<code>private List<Course> getCourseEntities(List<String> courseIds) { <START> if (courseIds.size() == 0) { <END> return new ArrayList<Course>(); } Query q = getPM().newQuery(Course.class); q.setFilter(":p.contains(ID)"); @SuppressWarnings("unchecked") List<Course> courses = (List<Course>) q.execute(courseIds); return courses; }</code><technical_language><code>isEmpty()</code></technical_language>

Target:
private List<Course> getCourseEntities(List<String> courseIds) { if (courseIds.isEmpty()) { return new ArrayList<Course>(); } Query q = getPM().newQuery(Course.class); q.setFilter(":p.contains(ID)"); @SuppressWarnings("unchecked") List<Course> courses = (List<Course>) q.execute(courseIds); return courses; }
Source:
<code>public void testDefaults() { ConfigAssertions.assertRecordedDefaults(ConfigAssertions.recordDefaults(ElasticsearchConnectorConfig.class) .setTableDescriptionDir(new File("etc/elasticsearch/")) .setDefaultSchema("default") .setTableNames("") .setScrollSize(1000) <START> .setScrollTime(new Duration(20, TimeUnit.SECONDS)) <END> .setMaxHits(1000000) .setRequestTimeout(new Duration(10, TimeUnit.SECONDS))); }</code><technical_language>static import SECONDS</technical_language>

Target:
public void testDefaults() { assertRecordedDefaults(ConfigAssertions.recordDefaults(ElasticsearchConnectorConfig.class) .setTableDescriptionDir(new File("etc/elasticsearch/")) .setDefaultSchema("default") .setTableNames("") .setScrollSize(1000) .setScrollTimeout(new Duration(20, SECONDS)) .setMaxHits(1000000) .setRequestTimeout(new Duration(10, SECONDS))); }
Source:
<code>public void renameFile() { <START> LinkedFileRenameDialogView dialog = new LinkedFileRenameDialogView(this.linkedFile); <END> String oldFile = this.linkedFile.getLink(); int nameCount = Paths.get(oldFile).getNameCount(); Path subPath = Paths.get(oldFile).subpath(0, nameCount - 1); Optional<LinkedFile> editedFile = dialog.showAndWait(); editedFile.ifPresent(file -> { String newFile = System.getProperty("file.separator") + subPath.toString() + System.getProperty("file.separator") + file.getLink(); this.linkedFile.setLink(newFile); FileUtil.renameFile(Paths.get(oldFile), Paths.get(newFile)); }); }</code><technical_language>for work, in opinion a simple TextInputDialog sufficient (instead of a custom dialog): <LINK_0></technical_language>

Target:
public void renameFile() { String oldFile = this.linkedFile.getLink(); Path oldFilePath = Paths.get(oldFile); Optional<String> editedFile = dialogService.showInputDialogWithDefaultAndWait(Localization.lang("Rename file"), Localization.lang("New Filename"), oldFilePath.getFileName().toString()); editedFile.ifPresent(file -> { Path newFile = Paths.get(oldFile).resolveSibling(file); this.linkedFile.setLink(newFile.toString()); FileUtil.renameFile(Paths.get(oldFile), newFile); }); }
Source:
<code>private String getProviderNameReplacement() { <START> return ReplacementUtils.getVariableAssignmentString(EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS, provider.getName()); <END> }</code><technical_language>EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS ? - '$providerName'</technical_language>

Target:
private String getProviderNameReplacement() { return ReplacementUtils.getVariableAssignmentString(EngineMessage.ACTION_TYPE_FAILED_EXTERNAL_PROVIDER_IS_READ_ONLY, provider.getName()); }
Source:
<code>LStat(int[] rawlstat) { ctimeSec = rawlstat[0]; ctimeNSec = rawlstat[1]; mtimeSec = rawlstat[2]; mtimeNSec = rawlstat[3]; device = rawlstat[4]; inode = rawlstat[5]; mode = FileMode.fromBits(rawlstat[6]); userId = rawlstat[7]; groupId = rawlstat[8]; <START> size = rawlstat[9] + rawlstat[10] << 32; <END> }</code><technical_language>This is overflow computed int. Also, precedence of + << widely known, prefer wrap () order of operations clear everyone. instead: size = ((long)rawlstat[9]) + (((long)rawlstat[10]) << 32); FWIW, else big endian ordering, weird high 32 bits of size occur in array 32 bits</technical_language>

Target:
LStat(int[] rawlstat) { ctimeSec = rawlstat[0]; ctimeNSec = rawlstat[1]; mtimeSec = rawlstat[2]; mtimeNSec = rawlstat[3]; device = rawlstat[4]; inode = rawlstat[5]; mode = FileMode.fromBits(rawlstat[6]); userId = rawlstat[7]; groupId = rawlstat[8]; size = (((long) rawlstat[9]) << 32) + rawlstat[10]; }
Source:
<code>public void open() throws InterpreterException { synchronized (this) { if (!isOpened) { for (Interpreter interpreter : getInterpreterGroup() .getOrCreateSession(this.getUserName(), sessionId)) { try { if (!(interpreter instanceof ConfInterpreter)) { ((RemoteInterpreter) interpreter).internal_create(); <START> ((RemoteInterpreter) interpreter).internal_create(); <END> } } catch (IOException e) { throw new InterpreterException(e); } } interpreterProcess.callRemoteFunction(client -> { LOGGER.info("Open RemoteInterpreter {}", getClassName()); synchronized (getInterpreterGroup()) { if (!getInterpreterGroup().isAngularRegistryPushed()) { pushAngularObjectRegistryToRemote(client); getInterpreterGroup().setAngularRegistryPushed(true); } } return null; }); isOpened = true; } } }</code><technical_language>Typo</technical_language>

Target:
public void open() throws InterpreterException { synchronized (this) { if (!isOpened) { for (Interpreter interpreter : getInterpreterGroup() .getOrCreateSession(this.getUserName(), sessionId)) { try { if (!(interpreter instanceof ConfInterpreter)) { ((RemoteInterpreter) interpreter).internal_create(); } } catch (IOException e) { throw new InterpreterException(e); } } interpreterProcess.callRemoteFunction(client -> { LOGGER.info("Open RemoteInterpreter {}", getClassName()); synchronized (getInterpreterGroup()) { if (!getInterpreterGroup().isAngularRegistryPushed()) { pushAngularObjectRegistryToRemote(client); getInterpreterGroup().setAngularRegistryPushed(true); } } return null; }); isOpened = true; } } }
Source:
<code>public boolean canConnectToExternal(EnumFacing dir, boolean ignoreDisabled) { World world = getBundle().getBundleWorldObj(); BlockCoord pos = getLocation(); <START> TileEntity te = world.getTileEntity(pos.getLocation(dir).getBlockPos()); <END> if(te instanceof TileConduitBundle) { return false; } if(te instanceof IPartHost) { IPart part = ((IPartHost) te).getPart(dir.getOpposite()); if(part == null) { part = ((IPartHost) te).getPart(AEPartLocation.INTERNAL); return part != null; } if(part.getExternalFacingNode() != null) { return true; } String name = part.getClass().getSimpleName(); return "PartP2PTunnelME".equals(name) || "PartQuartzFiber".endsWith(name) || "PartToggleBus".equals(name) || "PartInvertedToggleBus".equals(name); } else if(te instanceof IGridHost) { IGridNode node = ((IGridHost) te).getGridNode(AEPartLocation.fromFacing(dir.getOpposite())); if(node == null) { node = ((IGridHost) te).getGridNode(AEPartLocation.INTERNAL); } if(node != null) { return node.getGridBlock().getConnectableSides().contains(dir.getOpposite()); } } return false; }</code><technical_language>guard this world.isBlockLoaded() plz, thx. (is BlockEnder.getTileEntitySafe() static public? that)</technical_language>

Target:
public boolean canConnectToExternal(EnumFacing dir, boolean ignoreDisabled) { World world = getBundle().getBundleWorldObj(); BlockCoord pos = getLocation(); TileEntity te = BlockEnder.getAnyTileEntitySafe(world, pos.getLocation(dir).getBlockPos()); if(te instanceof TileConduitBundle) { return false; } if(te instanceof IPartHost) { IPart part = ((IPartHost) te).getPart(dir.getOpposite()); if(part == null) { part = ((IPartHost) te).getPart(AEPartLocation.INTERNAL); return part != null; } if(part.getExternalFacingNode() != null) { return true; } String name = part.getClass().getSimpleName(); return "PartP2PTunnelME".equals(name) || "PartQuartzFiber".equals(name) || "PartToggleBus".equals(name) || "PartInvertedToggleBus".equals(name); } else if(te instanceof IGridHost) { IGridNode node = ((IGridHost) te).getGridNode(AEPartLocation.fromFacing(dir.getOpposite())); if(node == null) { node = ((IGridHost) te).getGridNode(AEPartLocation.INTERNAL); } if(node != null) { return node.getGridBlock().getConnectableSides().contains(dir.getOpposite()); } } return false; }
Source:
<code>public void handleNiNotification(GpsNiNotification notif) { if (DEBUG) Log.d(TAG, "in handleNiNotification () :" + " notificationId: " + notif.notificationId + " requestorId: " + notif.requestorId + " text: " + notif.text); if (mNetInitiatedListener != null) { if <START> (mIsSuplEsEnabled == <END> 0) { if (DEBUG) Log.d(TAG, "SUPL_ES is disabled, calling handleNi(notif)"); handleNi(notif); } else { if (DEBUG) Log.d(TAG, "SUPL_ES is enabled, calling handleNiInEs(notif)"); handleNiInEs(notif); } } else { Log.e(TAG, "mNetInitiatedListener is null"); } }</code><technical_language>mIsSuplEsEnabled of type boolean</technical_language>

Target:
public void handleNiNotification(GpsNiNotification notif) { if (DEBUG) Log.d(TAG, "in handleNiNotification () :" + " notificationId: " + notif.notificationId + " requestorId: " + notif.requestorId + " text: " + notif.text + " mIsSuplEsEnabled" + mIsSuplEsEnabled); if (mIsSuplEsEnabled == true) { handleNi(notif); } else { handleNiInEs(notif); } }
Source:
<code><START> public boolean isAuthenticated(){ <END> return true; }</code><technical_language>more flexible allow set authenticated flag instead of returning true in MockEndpoint</technical_language>

Target:
public boolean isAuthenticated(){ return authenticated; }
Source:
<code>public McMMOPlayerBrewEvent(Player player, Block brewingStand) { super(player, SkillType.ALCHEMY); <START> this.setBrewingStandBlock(brewingStand); <END> cancelled = false; }</code><technical_language>For sake of consistency (and OCD), <code>this.brewingStand = brewingStand</code> setter here</technical_language>

Target:
public McMMOPlayerBrewEvent(Player player, Block brewingStand) { super(player, SkillType.ALCHEMY); this.brewingStand = brewingStand; cancelled = false; }
Source:
<code>public void capitalizeTurkish() { <START> Locale.setDefault(TURKEY_LOCALE); <END> String international = Strings.capitalize("international"); assertEquals("International", international); }</code><technical_language>I need store current default Locale in a method restore method. This "leak" this set</technical_language>

Target:
public void capitalizeTurkish() { Locale.setDefault( TURKEY_LOCALE ); String international = Strings.capitalize( "international" ); assertThat( international ).isEqualTo( "International" ); }
Source:
<code>private void preLoadSVG() { final SVGFigure svgFigure = new SVGFigure(); try { final File iconsFolder = new File(FileLocator.toFileURL(Platform.getBundle("org.bonitasoft.studio.pics").getResource("icons")).getFile()); <START> for (final String filename : new File(iconsFolder, "figures").list()) { <END> if (filename.endsWith(".svgz")) { svgFigure.setURI("platform:/plugin/org.bonitasoft.studio.pics/icons/figures/" + filename); } } for (final String filename : new File(iconsFolder, "decoration" + File.separatorChar + "svg").list()) { if (filename.endsWith(".svgz")) { svgFigure.setURI("platform:/plugin/org.bonitasoft.studio.pics/icons/decoration/svg/" + filename); } } } catch (final IOException e) { BonitaStudioLog.error(e); } }</code><technical_language>worth factorizing loop</technical_language>

Target:
private void preLoadSVG() { final SVGFigure svgFigure = new SVGFigure(); try { final File iconsFolder = new File(FileLocator.toFileURL(Platform.getBundle("org.bonitasoft.studio.pics").getResource("icons")).getFile()); initSVGFigure(svgFigure, iconsFolder, "figures"); initSVGFigure(svgFigure, iconsFolder, "decoration", "svg"); } catch (final IOException e) { BonitaStudioLog.error(e); } }
Source:
<code>private Response getSearchResponse(Account account, Map<String, String> queryParams) { String url = connectorUriGenerator.refundsURIWithParams(account, queryParams); Response connectorResponse = client .target(url) .request() .header(HttpHeaders.ACCEPT, APPLICATION_JSON) .get(); <START> LOGGER.info("response from connector for refunds search: {}", connectorResponse); <END> if (connectorResponse.getStatus() == SC_OK) { return processResponse(connectorResponse); } throw new SearchRefundsException(connectorResponse); }</code><technical_language>logging this is useful</technical_language>

Target:
private Response getSearchResponse(Account account, Map<String, String> queryParams) { String url = connectorUriGenerator.refundsURIWithParams(account, queryParams); Response connectorResponse = client .target(url) .request() .header(HttpHeaders.ACCEPT, APPLICATION_JSON) .get(); if (connectorResponse.getStatus() == SC_OK) { return processResponse(connectorResponse); } throw new SearchRefundsException(connectorResponse); }
Source:
<code>protected static int parseFraction(String string, int sign, String text) { if (string == null || string.length() == 0) { return 0; } try { string = (string + "000000000").substring(0, 9); return Integer.parseInt(string) * sign; } catch (NumberFormatException | ArithmeticException e) { <START> throw (DateTimeParseException) new DateTimeParseException( <END> "Text cannot be parsed to a PeriodAndDuration: fraction", text, 0).initCause(e); } }</code><technical_language>missing something, constructor a Throwable</technical_language>

Target:
protected static int parseFraction(String string, int sign, String text) { if (string == null || string.length() == 0) { return 0; } try { string = (string + "000000000").substring(0, 9); return Integer.parseInt(string) * sign; } catch (NumberFormatException | ArithmeticException e) { throw new DateTimeParseException("Text cannot be parsed to a PeriodAndDuration: fraction", text, 0, e); } }
Source:
<code>public Expression find(ActivityDefinition activityDefinition, long expressionDefinitionId) { final Expression displayName = activityDefinition.getDisplayName(); if (getExpressionWithId(displayName, expressionDefinitionId) != null) { return displayName; } final LoopCharacteristics loopCharacteristics = activityDefinition.getLoopCharacteristics(); final Expression expression = getExpressionFromContainer(loopCharacteristics, expressionDefinitionId); if (expression != null) { return expression; } for (BusinessDataDefinition businessDataDefinition : activityDefinition.getBusinessDataDefinitions()) { final Expression bizDataExpression = getExpressionFromContainer(businessDataDefinition, expressionDefinitionId); if (bizDataExpression != null) { return bizDataExpression; } } for (DataDefinition dataDefinition : activityDefinition.getDataDefinitions()) { final Expression dataExpression = getExpressionFromContainer(dataDefinition, expressionDefinitionId); if (dataExpression != null) { return dataExpression; } } final Expression expressionFromOperation = getExpressionFromOperationList(activityDefinition.getOperations(), expressionDefinitionId); if (expressionFromOperation != null) { return expressionFromOperation; } for (BoundaryEventDefinition boundaryEventDefinition : activityDefinition.getBoundaryEventDefinitions()) { final Expression expressionFromBoundary = getExpressionFromContainer(boundaryEventDefinition, expressionDefinitionId); <START> if (expressionFromBoundary == null) { <END> return expressionFromBoundary; } } return null; }</code><technical_language>!= null</technical_language>

Target:
public Expression find(ActivityDefinition activityDefinition, long expressionDefinitionId) { final Expression displayName = activityDefinition.getDisplayName(); if (getExpressionFromContainer(displayName, expressionDefinitionId) != null) { return displayName; } final LoopCharacteristics loopCharacteristics = activityDefinition.getLoopCharacteristics(); final Expression expression = getExpressionFromContainer(loopCharacteristics, expressionDefinitionId); if (expression != null) { return expression; } for (BusinessDataDefinition businessDataDefinition : activityDefinition.getBusinessDataDefinitions()) { final Expression bizDataExpression = getExpressionFromContainer(businessDataDefinition, expressionDefinitionId); if (bizDataExpression != null) { return bizDataExpression; } } for (DataDefinition dataDefinition : activityDefinition.getDataDefinitions()) { final Expression dataExpression = getExpressionFromContainer(dataDefinition, expressionDefinitionId); if (dataExpression != null) { return dataExpression; } } final Expression expressionFromOperation = getExpressionFromOperationList(activityDefinition.getOperations(), expressionDefinitionId); if (expressionFromOperation != null) { return expressionFromOperation; } for (BoundaryEventDefinition boundaryEventDefinition : activityDefinition.getBoundaryEventDefinitions()) { final Expression expressionFromBoundary = getExpressionFromContainer(boundaryEventDefinition, expressionDefinitionId); if (expressionFromBoundary != null) { return expressionFromBoundary; } } return null; }
Source:
<code>public Collection<Replay> getLocalReplays() { Collection<Replay> replayInfos = new ArrayList<>(); String replayFileGlob = clientProperties.getReplay().getReplayFileGlob(); Path replaysDirectory = preferencesService.getReplaysDirectory(); if (Files.notExists(replaysDirectory)) { noCatch(() -> createDirectories(replaysDirectory)); } try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(replaysDirectory, replayFileGlob)) { StreamSupport.stream(directoryStream.spliterator(), false) <START> .sorted(Comparator.comparing(path -> ((Path) path).toFile().lastModified()).reversed()) <END> .limit(MAX_REPLAYS) .forEach(replayFile -> { try { LocalReplayInfo replayInfo = replayFileReader.parseMetaData(replayFile); FeaturedMod featuredMod = modService.getFeaturedMod(replayInfo.getFeaturedMod()).get(); mapService.findByMapFolderName(replayInfo.getMapname()) .thenAccept(mapBean -> replayInfos.add(new Replay(replayInfo, replayFile, featuredMod, mapBean.orElse(null)))); } catch (Exception e) { logger.warn("Could not read replay file '{}'", replayFile, e); moveCorruptedReplayFile(replayFile); } }); } return replayInfos; }</code><technical_language>need a method exists in File (which is bad API), equivalent method exists in File (which is new, good API). suggestion .sorted(Comparator.comparing(path -> noCatch(() -> getLastModifiedTime(path))))</technical_language>

Target:
public Collection<Replay> getLocalReplays() { Collection<Replay> replayInfos = new ArrayList<>(); String replayFileGlob = clientProperties.getReplay().getReplayFileGlob(); Path replaysDirectory = preferencesService.getReplaysDirectory(); if (Files.notExists(replaysDirectory)) { noCatch(() -> createDirectories(replaysDirectory)); } try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(replaysDirectory, replayFileGlob)) { StreamSupport.stream(directoryStream.spliterator(), false) .sorted(Comparator.comparing(path -> noCatch(() -> Files.getLastModifiedTime((Path) path))).reversed()) .limit(MAX_REPLAYS) .forEach(replayFile -> { try { LocalReplayInfo replayInfo = replayFileReader.parseMetaData(replayFile); FeaturedMod featuredMod = modService.getFeaturedMod(replayInfo.getFeaturedMod()).get(); mapService.findByMapFolderName(replayInfo.getMapname()) .thenAccept(mapBean -> replayInfos.add(new Replay(replayInfo, replayFile, featuredMod, mapBean.orElse(null)))); } catch (Exception e) { logger.warn("Could not read replay file '{}'", replayFile, e); moveCorruptedReplayFile(replayFile); } }); } return replayInfos; }
Source:
<code>@VisibleForTesting BookingError asBookingError(String bookingErrorJson) { final JsonReader jsonReader = new JsonReader(new StringReader(bookingErrorJson)); <START> jsonReader.setLenient(true); <END> return gson.fromJson(jsonReader, BookingError.class); }</code><technical_language>setLenient(true)</technical_language>

Target:
@VisibleForTesting BookingError asBookingError(String bookingErrorJson) { return gson.fromJson(bookingErrorJson, BookingError.class); }
Source:
<code>public void onUserOnline(UserOnlineEvent event) { String username = event.getUsername(); Player player = playerService.getPlayerForUsername(username); if (player != null && player.getSocialStatus() == SocialStatus.FRIEND) { audioService.playFriendOnlineSound(); notificationService.addNotification( new TransientNotification( i18n.get("friend.nowOnlineNotification.title", username), i18n.get("friend.nowOnlineNotification.action"), IdenticonUtil.createIdenticon(player.getId()), event1 -> { <START> eventBus.post(new NavigateEvent(NavigationItem.CHAT)); <END> eventBus.post(new InitiatePrivateChatEvent(username)); } )); } }</code><technical_language>Avoid variable names event1</technical_language>

Target:
public void onUserOnline(UserOnlineEvent event) { String username = event.getUsername(); Player player = playerService.getPlayerForUsername(username); if (player != null && player.getSocialStatus() == SocialStatus.FRIEND) { audioService.playFriendOnlineSound(); notificationService.addNotification( new TransientNotification( i18n.get("friend.nowOnlineNotification.title", username), i18n.get("friend.nowOnlineNotification.action"), IdenticonUtil.createIdenticon(player.getId()), actionEvent -> { eventBus.post(new NavigateEvent(NavigationItem.CHAT)); eventBus.post(new InitiatePrivateChatEvent(username)); } )); } }
Source:
<code>public void onWireReceive(WireEnvelope wireEnvelope) { requireNonNull(wireEnvelope, message.wireEnvelopeNonNull()); <START> if (emitterThread != null) { <END> emitterThread.sumit(wireEnvelope); } }</code><technical_language>synchronized</technical_language>

Target:
public void onWireReceive(WireEnvelope wireEnvelope) { requireNonNull(wireEnvelope, message.wireEnvelopeNonNull()); if (emitterThread != null) { emitterThread.submit(wireEnvelope); } }
Source:
<code>public void executeCommand(UICommand command) { super.executeCommand(command); if ("OnSave".equals(command.getName())) { onSave(); } <START> if (command == getVnicProfileMappingCommand() && getWindow() == null) { <END> updateExternalVnicProfilesPerTargetCluster(); vnicProfileMappingModel = new VnicProfileMappingModel(this, externalVnicProfilesPerTargetCluster); vnicProfileMappingModel.initialize(); setWindow(vnicProfileMappingModel); } }</code><technical_language>this be: if (VNIC_PROFILE_MAPPING_COMMAND.equals(command.getName()) { window null get checking for help</technical_language>

Target:
public void executeCommand(UICommand command) { super.executeCommand(command); if ("OnSave".equals(command.getName())) { onSave(); } if (VNIC_PROFILE_MAPPING_COMMAND.equals(command.getName())) { onVnicProfileMappingCommand(); } }
Source:
<code>public void processBeforeCommit(IntegrationResourceHolder holder) { <START> if (this.beforeCommitChannel != null) { <END> doProcess(holder, this.beforeCommitExpression, this.beforeCommitChannel, "beforeCommit"); } }</code><technical_language>I this this is right solution. need build send a message is channel</technical_language>

Target:
public void processBeforeCommit(IntegrationResourceHolder holder) { doProcess(holder, this.beforeCommitExpression, this.beforeCommitChannel, "beforeCommit"); }
Source:
<code>public double getMeanJobPendingTime() { return executeReadOnlyTransaction(session -> { Query query = session.getNamedQuery("getMeanJobPendingTime"); Double result = (Double) query.uniqueResult(); <START> return result == null ? 0 : result; <END> }); }</code><technical_language>do need check for null other queries above? I is change 0 : result 0d : result for readability</technical_language>

Target:
public double getMeanJobPendingTime() { return executeReadOnlyTransaction(session -> { Query query = session.getNamedQuery("getMeanJobPendingTime"); Double result = (Double) query.uniqueResult(); return result == null ? 0.0d : result; }); }
Source:
<code>public EventBus build() { final String message = "Either storageFactory or eventStore must be " + <START> "set to build the EventBus instance"; <END> checkState(storageFactory != null || eventStore != null, message); if (eventStoreStreamExecutor == null) { this.eventStoreStreamExecutor = MoreExecutors.directExecutor(); } if (eventStore == null) { eventStore = EventStore.newBuilder() .setStreamExecutor(eventStoreStreamExecutor) .setStorageFactory(storageFactory) .setLogger(EventStore.log()) .build(); } if (dispatcherEventDelivery == null) { dispatcherEventDelivery = DispatcherEventDelivery.directDelivery(); } if (eventValidator == null) { eventValidator = MessageValidator.newInstance(); } final EventBus result = new EventBus(this); return result; }</code><technical_language>+ sign this line. wrapping a logical operators on</technical_language>

Target:
public EventBus build() { final String message = "Either storageFactory or eventStore must be " + "set to build the EventBus instance"; checkState(storageFactory != null || eventStore != null, message); if (eventStoreStreamExecutor == null) { eventStoreStreamExecutor = MoreExecutors.directExecutor(); } assert (eventStoreStreamExecutor != null); if (eventStore == null) { eventStore = EventStore.newBuilder() .setStreamExecutor(eventStoreStreamExecutor) .setStorageFactory(storageFactory) .setLogger(EventStore.log()) .build(); } if (dispatcherEventDelivery == null) { dispatcherEventDelivery = DispatcherEventDelivery.directDelivery(); } if (eventValidator == null) { eventValidator = MessageValidator.newInstance(); } final EventBus result = new EventBus(this); return result; }
Source:
<code><START> SequentialIntegerDataGenerator(Column columnRule) { <END> Preconditions.checkArgument(columnRule.getDataSequence() == DataSequence.SEQUENTIAL); Preconditions.checkArgument(isIntegerType(columnRule.getType())); this.columnRule = columnRule; minValue = columnRule.getMinValue(); maxValue = columnRule.getMaxValue(); counter = new AtomicLong(minValue); }</code><technical_language>Do want this Class package visible? declare pubic instead of package private default access modifies</technical_language>

Target:
public SequentialIntegerDataGenerator(Column columnRule) { Preconditions.checkArgument(columnRule.getDataSequence() == DataSequence.SEQUENTIAL); Preconditions.checkArgument(isIntegerType(columnRule.getType())); this.columnRule = columnRule; minValue = columnRule.getMinValue(); maxValue = columnRule.getMaxValue(); counter = new AtomicLong(0); }
Source:
<code>private void setMessageProperties(Message msg, Map<String, String> properties) throws ProducerException { if (msg != null && properties != null) { final Map<String, String> props = new HashMap<>(); if (properties != null) props.putAll(properties); if (this.properties != null) <START> props.putAll(this.properties); <END> props.entrySet().stream().filter(entry -> entry.getValue() != null) .forEach(property -> { try { if(msg.getObjectProperty(property.getKey()) == null) { msg.setObjectProperty(property.getKey(), property.getValue()); } } catch (Exception e) { } }); } }</code><technical_language>Weird producer properties override passed properties</technical_language>

Target:
private void setMessageProperties(Message msg, Map<String, String> properties) throws ProducerException { if (msg != null && properties != null) { final Map<String, String> props = new HashMap<>(); if (this.properties != null) props.putAll(this.properties); if (properties != null) props.putAll(properties); props.entrySet().stream().filter(entry -> entry.getValue() != null) .forEach(property -> { try { if (msg.getObjectProperty(property.getKey()) == null) { msg.setObjectProperty(property.getKey(), property.getValue()); } } catch (Exception e) { } }); } }
Source:
<code>public SubmitQueryResponse executeQuery(Session session, String query, boolean isJson) { LOG.info("Query: " + query); QueryContext queryContext = createQueryContext(session); <START> QueryContextUtil.updatePythonScriptPath(context.getConf(), queryContext); <END> Expr planningContext; try { if (isJson) { planningContext = buildExpressionFromJson(query); } else { planningContext = buildExpressionFromSql(query, session); } String jsonExpr = planningContext.toJson(); LogicalPlan plan = createLogicalPlan(queryContext, planningContext); SubmitQueryResponse response = queryExecutor.execute(queryContext, session, query, jsonExpr, plan); return response; } catch (Throwable t) { context.getSystemMetrics().counter("Query", "errorQuery").inc(); LOG.error("\nStack Trace:\n" + StringUtils.stringifyException(t)); SubmitQueryResponse.Builder responseBuilder = SubmitQueryResponse.newBuilder(); responseBuilder.setUserName(queryContext.get(SessionVars.USERNAME)); responseBuilder.setQueryId(QueryIdFactory.NULL_QUERY_ID.getProto()); responseBuilder.setIsForwarded(true); responseBuilder.setResultCode(ClientProtos.ResultCode.ERROR); String errorMessage = t.getMessage(); if (t.getMessage() == null) { errorMessage = t.getClass().getName(); } responseBuilder.setErrorMessage(errorMessage); responseBuilder.setErrorTrace(StringUtils.stringifyException(t)); return responseBuilder.build(); } }</code><technical_language>GeneralFunctionEval TajoConf instance, necessary</technical_language>

Target:
public SubmitQueryResponse executeQuery(Session session, String query, boolean isJson) { LOG.info("Query: " + query); QueryContext queryContext = createQueryContext(session); Expr planningContext; try { if (isJson) { planningContext = buildExpressionFromJson(query); } else { planningContext = buildExpressionFromSql(query, session); } String jsonExpr = planningContext.toJson(); LogicalPlan plan = createLogicalPlan(queryContext, planningContext); SubmitQueryResponse response = queryExecutor.execute(queryContext, session, query, jsonExpr, plan); return response; } catch (Throwable t) { context.getSystemMetrics().counter("Query", "errorQuery").inc(); LOG.error("\nStack Trace:\n" + StringUtils.stringifyException(t)); SubmitQueryResponse.Builder responseBuilder = SubmitQueryResponse.newBuilder(); responseBuilder.setUserName(queryContext.get(SessionVars.USERNAME)); responseBuilder.setQueryId(QueryIdFactory.NULL_QUERY_ID.getProto()); responseBuilder.setIsForwarded(true); responseBuilder.setResultCode(ClientProtos.ResultCode.ERROR); String errorMessage = t.getMessage(); if (t.getMessage() == null) { errorMessage = t.getClass().getName(); } responseBuilder.setErrorMessage(errorMessage); responseBuilder.setErrorTrace(StringUtils.stringifyException(t)); return responseBuilder.build(); } }
Source:
<code>public static void init() throws IOException { SWTBotUtils.failIfUIThread(); Thread.currentThread().setName("SWTBot Thread"); SWTBotPreferences.TIMEOUT = 20000; fLogger.addAppender(new ConsoleAppender(new SimpleLayout())); fBot = new SWTWorkbenchBot(); SWTBotUtils.closeView("welcome", fBot); SWTBotUtils.switchToTracingPerspective(); SWTBotUtils.waitForJobs(); fFileLocation = File.createTempFile("sample", ".xml"); String eventNames[] = { "test:SEND", "test:RECEIVE" }; String targets[] = { <START> "cloud", <END> "aerith" }; try (BufferedRandomAccessFile braf = new BufferedRandomAccessFile(fFileLocation, "rw")) { braf.writeBytes(TRACE_START); for (int i = 0; i < 100; i++) { braf.writeBytes(makeEvent(i * i * 100, eventNames[i % 2], targets[i % 2], targets[(i + 1) % 2], Integer.toString(i % 2 + 1000))); } braf.writeBytes(TRACE_END); } }</code><technical_language>"boring" names instead? target1, target2</technical_language>

Target:
public static void init() throws IOException { SWTBotUtils.failIfUIThread(); Thread.currentThread().setName("SWTBot Thread"); SWTBotPreferences.TIMEOUT = 20000; fLogger.addAppender(new ConsoleAppender(new SimpleLayout())); fBot = new SWTWorkbenchBot(); SWTBotUtils.closeView("welcome", fBot); SWTBotUtils.switchToTracingPerspective(); SWTBotUtils.waitForJobs(); fFileLocation = File.createTempFile("sample", ".xml"); String eventNames[] = { "test:SEND", "test:RECEIVE" }; String targets[] = { "peer1", "peer2" }; try (BufferedRandomAccessFile braf = new BufferedRandomAccessFile(fFileLocation, "rw")) { braf.writeBytes(TRACE_START); for (int i = 0; i < 100; i++) { braf.writeBytes(makeEvent(i * i * 100, eventNames[i % 2], targets[i % 2], targets[(i + 1) % 2], Integer.toString(i % 2 + 1000))); } braf.writeBytes(TRACE_END); } }
Source:
<code>public void setSpatialOps(SpatialOperatorsType spatialOperators) { spatialOps = new ConcurrentHashMap<SPATIAL_OPERATORS, SpatialOperatorType>( new EnumMap<SPATIAL_OPERATORS, SpatialOperatorType>(SPATIAL_OPERATORS.class)); for (SpatialOperatorType spatialOp : spatialOperators.getSpatialOperator()) { LOGGER.debug("Adding key [spatialOp Name: {}]", spatialOp.getName()); spatialOps.put(SPATIAL_OPERATORS.valueOf(spatialOp.getName()), spatialOp); if (LOGGER.isDebugEnabled()) { <START> LOGGER.debug("spatialOps Map: {}", spatialOps.toString()); <END> } } }</code><technical_language>remove call .toString() avoid if</technical_language>

Target:
public void setSpatialOps(SpatialOperatorsType spatialOperators) { spatialOps = new ConcurrentHashMap<SPATIAL_OPERATORS, SpatialOperatorType>( new EnumMap<SPATIAL_OPERATORS, SpatialOperatorType>(SPATIAL_OPERATORS.class)); for (SpatialOperatorType spatialOp : spatialOperators.getSpatialOperator()) { LOGGER.debug("Adding key [spatialOp Name: {}]", spatialOp.getName()); spatialOps.put(SPATIAL_OPERATORS.valueOf(spatialOp.getName()), spatialOp); LOGGER.debug("spatialOps Map: {}", spatialOps); } }
Source:
<code>public void changeAccount(Account account) { userManager.setSessionCookie(null); userManager.setSessionToken(null); displayFab.set(!userManager.isGuest(account)); if (account == null) return; if (userManager.getUsername(account).equals(username.get())) <START> return; <END> userManager.moreBusy("main login"); username.set(userManager.getUsername(account)); url.set(userManager.getSiteUrl(account)); Log.d("MainViewModel", "login " + username.get() + " on " + url.get()); LoginSubscriber loginSubscriber = new LoginSubscriber(); if (userManager.isGuest(account)) { loginSubscriber.onNext(new SuccessResponse()); } else { mUserRepository.login(account).subscribe(loginSubscriber); } }</code><technical_language>this work if accounts servers username</technical_language>

Target:
public void changeAccount(Account account) { userManager.setSessionCookie(null); userManager.setSessionToken(null); displayFab.set(!userManager.isGuest(account)); if (account == null) return; EspressoIdlingResource.moreBusy("main login"); username.set(userManager.getUsername(account)); url.set(userManager.getSiteUrl(account)); Log.d("MainViewModel", "login " + username.get() + " on " + url.get()); LoginSubscriber loginSubscriber = new LoginSubscriber(); if (userManager.isGuest(account)) { loginSubscriber.onNext(new SuccessResponse()); } else { mUserRepository.login(account).subscribe(loginSubscriber); } }
Source:
<code>public void setName(String name) { if (Strings.isNotNullAndNotEmpty(name)) { m_name = name; <START> } <END> }</code><technical_language>else? warning exception there</technical_language>

Target:
public void setName(String name) { if (Strings.isNullOrEmpty(name)) { throw new IllegalArgumentException("Suite name cannot be null (or) empty."); } m_name = name; }
Source:
<code>protected void hookOnNext(T value) { if (durationTimer.isStarted()) { durationTimer.stop(); } <START> if (durationTimer != null && durationTimer.getTime() > thresholdForDiagnosticsInMs) { <END> if (value instanceof CosmosItemResponse) { CosmosItemResponse itemResponse = (CosmosItemResponse) value; logger.info("Request taking longer than {}ms diagnostic = {}", thresholdForDiagnosticsInMs, itemResponse.getDiagnostics().toString()); } else if (value instanceof FeedResponse) { durationTimer.reset(); durationTimer.start(); FeedResponse feedResponse = (FeedResponse) value; logger.info("Request taking longer than {}ms diagnostic = {}", thresholdForDiagnosticsInMs, feedResponse.getCosmosDiagnostics().toString()); } } logger.debug("hookOnNext: {}, count:{}", value, count.get()); }</code><technical_language>StopWatch threads is thread safe. Please a volatile long for measuring checkpoint. suggestion if (durationTimer != null && System.currentMilis() startTimeInMs- > thresholdForDiagnosticsInMs) {</technical_language>

Target:
protected void hookOnNext(T value) { if ((System.currentTimeMillis() - startTimeInMs) > diagnosticsThresholdDuration.toMillis()) { if (value instanceof CosmosItemResponse) { CosmosItemResponse itemResponse = (CosmosItemResponse) value; logger.info("Request taking longer than {}ms diagnostic = {}", diagnosticsThresholdDuration.toMillis(), itemResponse.getDiagnostics().toString()); } else if (value instanceof FeedResponse) { startTimeInMs = System.currentTimeMillis(); FeedResponse feedResponse = (FeedResponse) value; logger.info("Request taking longer than {}ms diagnostic = {}", diagnosticsThresholdDuration.toMillis(), feedResponse.getCosmosDiagnostics().toString()); } } logger.debug("hookOnNext: {}, count:{}", value, count.get()); }
Source:
<code>public void testMillisIsIndepedentOfOffset() throws ParseException { DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); Date date = format.parse("2010-06-29T23:20:00+0000"); Calendar cal1 = Calendar.getInstance(); cal1.setTimeZone(TimeZone.getTimeZone("GMT+00:00")); cal1.setTime(date); Timestamp t1 = Timestamp.forCalendar(cal1); Calendar cal2 = Calendar.getInstance(); cal2.setTimeZone(TimeZone.getTimeZone("GMT+02:00")); cal2.setTime(date); Timestamp t2 = Timestamp.forCalendar(cal2); assertEquals(t1.getMillis(), t2.getMillis()); <START> assertEquals(t1.getDecimalMillis(), t2.getDecimalMillis()); <END> }</code><technical_language>I assert more things: 1. of getMillis() getDecimalMillis() is same. 2. This is *correct* (i.e. cal1.getTimeInMillis())</technical_language>

Target:
public void testMillisIsIndepedentOfOffset() throws ParseException { DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); Date date = format.parse("2010-06-29T23:20:00+0000"); Calendar cal1 = Calendar.getInstance(); cal1.setTimeZone(TimeZone.getTimeZone("GMT+00:00")); cal1.setTime(date); Timestamp t1 = Timestamp.forCalendar(cal1); Calendar cal2 = Calendar.getInstance(); cal2.setTimeZone(TimeZone.getTimeZone("GMT+02:00")); cal2.setTime(date); Timestamp t2 = Timestamp.forCalendar(cal2); assertEquals(t1.getMillis(), date.getTime()); assertEquals(t2.getMillis(), date.getTime()); assertEquals(BigDecimal.valueOf(t1.getMillis()), t1.getDecimalMillis()); assertEquals(BigDecimal.valueOf(t2.getMillis()), t2.getDecimalMillis()); assertEquals(t1.getMillis(), t2.getMillis()); assertEquals(t1.getDecimalMillis(), t2.getDecimalMillis()); }
Source:
<code>public static void addBundleToMap(Map<Object, String> map, IPluginModelBase bundle, String sl) { BundleDescription desc = bundle.getBundleDescription(); boolean defaultsl = (sl == null || sl.equals("default:default")); if (desc != null && defaultsl) { String modelName = desc.getSymbolicName(); if (IPDEBuildConstants.BUNDLE_DS.equals(modelName)) { map.put(bundle, "2:true"); } else if (IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR .equals(modelName)) { map.put(bundle, "1:true"); } else if (IPDEBuildConstants.BUNDLE_EQUINOX_COMMON .equals(modelName)) { map.put(bundle, "2:true"); } else if (IPDEBuildConstants.BUNDLE_OSGI.equals(modelName)) { map.put(bundle, "-1:true"); } else if (BUNDLE_UPDATE_CONFIGURATOR .equals(modelName)) { map.put(bundle, BundleLauncherHelper.DEFAULT_UPDATE_CONFIGURATOR_START_LEVEL); } else if (IPDEBuildConstants.BUNDLE_CORE_RUNTIME.equals(modelName)) { <START> if (TargetPlatformHelper.getTargetVersion() > 4.1) { <END> map.put(bundle, "default:true"); } else { map.put(bundle, "2:true"); } } else { map.put(bundle, sl); } } else { map.put(bundle, sl); } }</code><technical_language>= 4.2 (Kepler)</technical_language>

Target:
public static void addBundleToMap(Map<Object, String> map, IPluginModelBase bundle, String sl) { BundleDescription desc = bundle.getBundleDescription(); boolean defaultsl = (sl == null || sl.equals("default:default")); if (desc != null && defaultsl) { String modelName = desc.getSymbolicName(); if (IPDEBuildConstants.BUNDLE_DS.equals(modelName)) { map.put(bundle, "2:true"); } else if (IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR .equals(modelName)) { map.put(bundle, "1:true"); } else if (IPDEBuildConstants.BUNDLE_EQUINOX_COMMON .equals(modelName)) { map.put(bundle, "2:true"); } else if (IPDEBuildConstants.BUNDLE_OSGI.equals(modelName)) { map.put(bundle, "-1:true"); } else if (BUNDLE_UPDATE_CONFIGURATOR .equals(modelName)) { map.put(bundle, BundleLauncherHelper.DEFAULT_UPDATE_CONFIGURATOR_START_LEVEL); } else if (IPDEBuildConstants.BUNDLE_CORE_RUNTIME.equals(modelName)) { if (TargetPlatformHelper.getTargetVersion() >= 4.3) { map.put(bundle, "default:true"); } else { map.put(bundle, "2:true"); } } else { map.put(bundle, sl); } } else { map.put(bundle, sl); } }