auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testSingleLaunchStartupFullyDrawnMetric() throws Exception { String settingsLaunchCommand = <START> String.format(LUANCH_APP_CMD_TEMPLATE, SETTINGS_PKG_NAME); <END> HelperTestUtility.executeShellCommand(String.format(KEYEVENT_CMD_TEMPLATE, KEYCODE_WAKEUP)); SystemClock.sleep(HelperTestUtility.ACTION_DELAY); HelperTestUtility.executeShellCommand(String.format(KEYEVENT_CMD_TEMPLATE, KEYCODE_UNLOCK)); SystemClock.sleep(HelperTestUtility.ACTION_DELAY); assertTrue(mAppStartupHelper.startCollecting()); HelperTestUtility.executeShellCommand(settingsLaunchCommand); SystemClock.sleep(HelperTestUtility.ACTION_DELAY); boolean hasFullyDrawnKey = false; Map<String, StringBuilder> appLaunchMetrics = mAppStartupHelper.getMetrics(); for (String key : appLaunchMetrics.keySet()) { if (key.contains(FULLY_DRAWN_KEY_KEYWORD) && key.contains(SETTINGS_PKG_NAME)) { hasFullyDrawnKey = true; } } assertTrue(hasFullyDrawnKey); assertTrue(mAppStartupHelper.stopCollecting()); HelperTestUtility.executeShellCommand(String.format(KEYEVENT_CMD_TEMPLATE, KEYCODE_HOME)); SystemClock.sleep(HelperTestUtility.ACTION_DELAY); HelperTestUtility.clearApp(String.format(KILL_TEST_APP_CMD_TEMPLATE, SETTINGS_PKG_NAME)); SystemClock.sleep(HelperTestUtility.ACTION_DELAY); }</code><technical_language>calendar calculator test app</technical_language>

Target:
public void testSingleLaunchStartupFullyDrawnMetric() throws Exception { assertTrue(mAppStartupHelper.startCollecting()); HelperTestUtility.launchPackageViaAdb(SETTINGS_PKG_NAME); SystemClock.sleep(HelperTestUtility.ACTION_DELAY); boolean hasFullyDrawnKey = false; Map<String, StringBuilder> appLaunchMetrics = mAppStartupHelper.getMetrics(); for (String key : appLaunchMetrics.keySet()) { if (key.contains(FULLY_DRAWN_KEY_KEYWORD) && key.contains(SETTINGS_PKG_NAME)) { hasFullyDrawnKey = true; } } assertTrue(hasFullyDrawnKey); assertTrue(mAppStartupHelper.stopCollecting()); HelperTestUtility.sendKeyCode(KEYCODE_HOME); SystemClock.sleep(HelperTestUtility.ACTION_DELAY); HelperTestUtility.clearApp(String.format(KILL_TEST_APP_CMD_TEMPLATE, SETTINGS_PKG_NAME)); SystemClock.sleep(HelperTestUtility.ACTION_DELAY); }
Source:
<code>private void newAppBar() { DWORD dwABM = new DWORD(); APPBARDATA ABData = new APPBARDATA.ByReference(); ABData.uCallbackMessage.setValue( WM_USER + 1); ABData.cbSize.setValue( ABData.size() ); dwABM.setValue(ShellAPI.ABM_NEW); UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage( dwABM, ABData); <START> assertNotNull(result ); <END> }</code><technical_language>Extra space result</technical_language>

Target:
private void newAppBar() { APPBARDATA data = new APPBARDATA.ByReference(); data.cbSize.setValue(data.size()); data.uCallbackMessage.setValue(WM_USER + 1); UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_NEW), data); assertNotNull(result); }
Source:
<code>public void resourceChanged(final IResourceChangeEvent event) { final Set<IMarker> added = new HashSet<>(); final Set<IMarker> removed = new HashSet<>(); boolean changed = false; for (final IMarkerDelta delta : event.findMarkerDeltas(IMarker.BOOKMARK, false)) { if (delta.getResource().equals(fFile)) { if (delta.getKind() == IResourceDelta.REMOVED) { removed.add(delta.getMarker()); } else if (delta.getKind() == IResourceDelta.ADDED) { added.add(delta.getMarker()); } <START> changed = true; <END> } } if (!changed) { return; } Display.getDefault().asyncExec(new Runnable() { @Override public void run() { if (!removed.isEmpty()) { fEventsTable.removeBookmark(Iterables.toArray(removed, IMarker.class)); } if (!added.isEmpty()) { fEventsTable.addBookmark(Iterables.toArray(added, IMarker.class)); } if (removed.isEmpty() && added.isEmpty()) { fEventsTable.getTable().refresh(); } } }); }</code><technical_language>this true if is added removed</technical_language>

Target:
public void resourceChanged(final IResourceChangeEvent event) { final Set<IMarker> added = new HashSet<>(); final Set<IMarker> removed = new HashSet<>(); boolean deltaFound = false; for (final IMarkerDelta delta : event.findMarkerDeltas(IMarker.BOOKMARK, false)) { if (delta.getResource().equals(fFile)) { if (delta.getKind() == IResourceDelta.REMOVED) { removed.add(delta.getMarker()); } else if (delta.getKind() == IResourceDelta.ADDED) { added.add(delta.getMarker()); } deltaFound = true; } } if (!deltaFound) { return; } Display.getDefault().asyncExec(new Runnable() { @Override public void run() { if (removed.isEmpty() && added.isEmpty()) { fEventsTable.getTable().refresh(); } else { if (!removed.isEmpty()) { fEventsTable.removeBookmark(Iterables.toArray(removed, IMarker.class)); } if (!added.isEmpty()) { fEventsTable.addBookmark(Iterables.toArray(added, IMarker.class)); } } } }); }
Source:
<code>public void searchForProcesses() throws Exception { <START> desktopPage.searchInSearchField("process"); <END> int numberOfResults = searchResultPage.getNumberOfResults(); assertEquals("There should be two processes found",2,numberOfResults); searchResultPage.searchInSearchField("Second"); Thread.sleep(2000); assertEquals("There should be two processes found",2,searchResultPage.getNumberOfResults()); searchResultPage.searchInSearchField("möhö"); Thread.sleep(2000); assertEquals("There should be no processes found",0,searchResultPage.getNumberOfResults()); }</code><technical_language>more elegant method Browser class: getDelayMaxAfterLinkClick()</technical_language>

Target:
public void searchForProcesses() throws Exception { desktopPage.searchInSearchField("process"); int numberOfResults = searchResultPage.getNumberOfResults(); assertEquals("There should be two processes found", 2, numberOfResults); searchResultPage.searchInSearchField("Second"); await("Wait for visible search results").atMost(20, TimeUnit.SECONDS).ignoreExceptions().untilAsserted( () -> assertEquals("There should be two processes found", 2, searchResultPage.getNumberOfResults())); searchResultPage.searchInSearchField("möhö"); await("Wait for visible search results").atMost(20, TimeUnit.SECONDS).ignoreExceptions().untilAsserted( () -> assertEquals("There should be no processes found", 0, searchResultPage.getNumberOfResults())); }
Source:
<code>private void checkSubmodules() throws IOException { ObjectDatabase odb = db.getObjectDatabase(); if (objectChecker == null) { return; } for (GitmoduleEntry entry : objectChecker.getGitsubmodules()) { AnyObjectId blobId = entry.getBlobId(); ObjectLoader blob = odb.open(blobId, Constants.OBJ_BLOB); try { SubmoduleValidator.assertValidGitModulesFile( new String(blob.getBytes(), UTF_8)); } catch <START> (LargeObjectException | <END> SubmoduleValidationException e) { throw new IOException(e.getMessage(), e); } } }</code><technical_language>is this coming from</technical_language>

Target:
private void checkSubmodules() throws IOException { ObjectDatabase odb = db.getObjectDatabase(); if (objectChecker == null) { return; } for (GitmoduleEntry entry : objectChecker.getGitsubmodules()) { AnyObjectId blobId = entry.getBlobId(); ObjectLoader blob = odb.open(blobId, Constants.OBJ_BLOB); try { SubmoduleValidator.assertValidGitModulesFile( new String(blob.getBytes(), UTF_8)); } catch (LargeObjectException | SubmoduleValidationException e) { throw new IOException(e); } } }
Source:
<code>public Object invoke(MethodInvocation methodInvocation) throws Throwable { Object result; try { result = methodInvocation.proceed(); } catch (ValidationException e) { List<ErrorMessage> messages = Lists.newArrayList(); for (Error error : e.errors) { messages.add(new ErrorMessage(error.message)); } return Reply.with(new Errors(messages)).status(SC_BAD_REQUEST).as(Json.class); } catch (ClassCastException e) { return Reply.with(new Errors(Lists.newArrayList(new ErrorMessage(defaultInternalServerError)))).status(SC_BAD_REQUEST).as(Json.class); } catch (NotFoundException e) { return Reply.with(new Errors(Lists.newArrayList(new ErrorMessage(e.getMessage())))).status(SC_NOT_FOUND).as(Json.class); <START> } catch (EmergencyNumberException e) { <END> return Reply.with(new Errors(Lists.newArrayList(new ErrorMessage(e.getMessage())))).status(SC_BAD_REQUEST).as(Json.class); } catch (RuntimeException e) { logger.error("Exception stack trace", e); if(isNullOrEmpty(e.getMessage())) { return Reply.with(new Errors(Lists.newArrayList(new ErrorMessage(defaultInternalServerError)))).error().as(Json.class); } return Reply.with(new Errors(Lists.newArrayList(new ErrorMessage(e.getMessage())))).error().as(Json.class); } if (!(result instanceof Reply)) { throw new ProgrammerMistake("Wrong interceptor binding was performed. It seems that methods that are not returning" + " Reply objects are matched."); } return result; }</code><technical_language>do tests for this</technical_language>

Target:
public Object invoke(MethodInvocation methodInvocation) throws Throwable { Object result; try { result = methodInvocation.proceed(); } catch (ValidationException e) { List<ErrorMessage> messages = Lists.newArrayList(); for (Error error : e.errors) { messages.add(new ErrorMessage(error.message)); } return Reply.with(new Errors(messages)).status(SC_BAD_REQUEST).as(Json.class); } catch (ClassCastException e) { return Reply.with(new Errors(Lists.newArrayList(new ErrorMessage(defaultInternalServerError)))).status(SC_BAD_REQUEST).as(Json.class); } catch (NotFoundException e) { return Reply.with(new Errors(Lists.newArrayList(new ErrorMessage(e.getMessage())))).status(SC_NOT_FOUND).as(Json.class); } catch (RuntimeException e) { logger.error("Exception stack trace", e); if(isNullOrEmpty(e.getMessage())) { return Reply.with(new Errors(Lists.newArrayList(new ErrorMessage(defaultInternalServerError)))).error().as(Json.class); } return Reply.with(new Errors(Lists.newArrayList(new ErrorMessage(e.getMessage())))).error().as(Json.class); } if (!(result instanceof Reply)) { throw new ProgrammerMistake("Wrong interceptor binding was performed. It seems that methods that are not returning" + " Reply objects are matched."); } return result; }
Source:
<code>private ArrayList<NewConnectionSnippetParts> parseSnippet(String input) { ArrayList<NewConnectionSnippetParts> parts = new ArrayList<NewConnectionSnippetParts>(); String pattern = "\\$\\{([0-9]+):([^:=}]+)(=([^:}]+))?(:([^}]+))?\\}"; RegExp regExp = RegExp.compile(pattern, "g"); for (MatchResult matcher = regExp.exec(input); matcher != null; matcher = regExp.exec(input)) { if (matcher.getGroupCount() >= 2) { int order = 0; try { order = Integer.parseInt(matcher.getGroup(1)); } catch (NumberFormatException e) { } String key = matcher.getGroup(2); String value = matcher.getGroupCount() >= 4 ? matcher.getGroup(4) : null; String connStringField = matcher.getGroupCount() >= 6 ? matcher.getGroup(6) : null; if (value != null) { value = value.replaceAll("\\$colon\\$", ":"); value = value.replaceAll("\\$equal\\$", "="); } parts.add(new NewConnectionSnippetParts(order, key, value, connStringField)); } } Collections.sort(parts, new Comparator<NewConnectionSnippetParts>() { @Override public int compare(NewConnectionSnippetParts p1, NewConnectionSnippetParts p2) { <START> return p1.getOrder() == p2.getOrder() ? 0 : p1.getOrder() < p2.getOrder() ? -1 : 1; <END> } }); return parts; }</code><technical_language>do p1.getOrder() - p2.getOrder() :-)</technical_language>

Target:
private ArrayList<NewConnectionSnippetParts> parseSnippet(String input) { ArrayList<NewConnectionSnippetParts> parts = new ArrayList<NewConnectionSnippetParts>(); RegExp regExp = RegExp.compile(pattern_, "g"); for (MatchResult matcher = regExp.exec(input); matcher != null; matcher = regExp.exec(input)) { if (matcher.getGroupCount() >= 2) { int order = 0; try { order = Integer.parseInt(matcher.getGroup(1)); } catch (NumberFormatException e) { } String key = matcher.getGroup(2); String value = matcher.getGroupCount() >= 4 ? matcher.getGroup(4) : null; String connStringField = matcher.getGroupCount() >= 6 ? matcher.getGroup(6) : null; if (value != null) { value = value.replaceAll("\\$colon\\$", ":"); value = value.replaceAll("\\$equal\\$", "="); } parts.add(new NewConnectionSnippetParts(order, key, value, connStringField)); } } Collections.sort(parts, new Comparator<NewConnectionSnippetParts>() { @Override public int compare(NewConnectionSnippetParts p1, NewConnectionSnippetParts p2) { return p1.getOrder() - p2.getOrder(); } }); return parts; }
Source:
<code>public boolean checkTypesAndScope(Model model, Map scope) { boolean correct = true; for (int i = 0; i < terms.size(); ++i) { Object element = terms.get(i); if (element instanceof Term) { Term term = (Term) element; Term termInScope = term.getTermInScope(model, scope); if (termInScope == null) { correct = false; } else { terms.set(i, termInScope); } } else if (element instanceof ListSpec) { ListSpec listSpec = (ListSpec) element; if (listSpec.checkTypesAndScope(model, scope)) { <START> terms.set(i, listSpec); <END> } else { correct = false; } } else { throw new IllegalArgumentException( "don't know how to process set element of type " + terms.get(i).getClass().getName()); } } return correct; }</code><technical_language>doesnot necessary for this line</technical_language>

Target:
public boolean checkTypesAndScope(Model model, Map scope) { boolean correct = true; for (int i = 0; i < terms.size(); ++i) { Object element = terms.get(i); if (element instanceof Term) { Term term = (Term) element; if (term.getTermInScope(model, scope) == null) { correct = false; } } else if (element instanceof ListSpec) { ListSpec listSpec = (ListSpec) element; if (!listSpec.checkTypesAndScope(model, scope)) { correct = false; } } else { throw new IllegalArgumentException( "don't know how to process set element of type " + terms.get(i).getClass().getName()); } } return correct; }
Source:
<code>public SquareContainer(Map<Direction, SquareContainer> neighbours, AbstractSquare square) { this.square = square; this.decorators = new HashMap<Property, AbstractSquareDecorator>(); if (!canHaveAsNeighbours(neighbours)) throw new IllegalArgumentException( "the specified neighbours could not be set as the neighbours for this square!"); this.neighbours = new HashMap<Direction, SquareContainer>(neighbours); for (Direction direction : neighbours.keySet()) <START> neighbours.get(direction).neighbours.put(direction.getOppositeDirection(), this); <END> }</code><technical_language>a (private) addSquareInDirection() for this</technical_language>

Target:
public SquareContainer(Map<Direction, SquareContainer> neighbours, AbstractSquare square) { if (square == null) throw new IllegalArgumentException("the given square cannot be null"); if (!canHaveAsNeighbours(neighbours)) throw new IllegalArgumentException( "the specified neighbours could not be set as the neighbours for this square!"); this.square = square; this.decorators = new HashMap<Property, AbstractSquareDecorator>(); this.neighbours = new HashMap<Direction, SquareContainer>(neighbours); for (Direction direction : neighbours.keySet()) neighbours.get(direction).setNeighbourInDirection(direction.getOppositeDirection(), this); }
Source:
<code>public void onApplicationEvent(RefreshRemoteApplicationEvent event) { log.info("Received remote refresh request."); <START> if (serviceMatcher == null) { <END> log.warn( "RefreshListener does not have a ServiceMatcher, refresh will not be performed. Consider" + "passing a ServiceMatcher in the constructor"); return; } if (serviceMatcher.isForSelf(event)) { Set<String> keys = this.contextRefresher.refresh(); log.info("Keys refreshed " + keys); } else { log.info("Refresh not performed, the event was targetting " + event.getDestinationService()); } }</code><technical_language>I if serviceMatcher == null need preserve existing behavior do refresh? log warning. do think</technical_language>

Target:
public void onApplicationEvent(RefreshRemoteApplicationEvent event) { log.info("Received remote refresh request."); if (serviceMatcher == null) { log.warn( "RefreshListener does not have a ServiceMatcher, refresh may be performed even if " + "the event does not target this app. Consider passing a ServiceMatcher in " + "the constructor"); refresh(); } else if (serviceMatcher.isForSelf(event)) { refresh(); } else { log.info("Refresh not performed, the event was targetting " + event.getDestinationService()); } }
Source:
<code>public String getObservedScript() { if (observeredScript == null) { if (failureInfos.size() == 0) { <START> observeredScript = expectedScript; <END> } else { StringBuilder builder = new StringBuilder(); processRegion(builder, scriptInfo, failureInfos); if (!failureInfos.isEmpty()) { throw new RuntimeException("Script failure detected but not located"); } observeredScript = builder.toString(); } } return observeredScript; }</code><technical_language>Extra space =</technical_language>

Target:
public String getObservedScript() { if (observeredScript == null) { int numberOfFailures = failureInfos.size(); if (numberOfFailures == 0) { observeredScript = expectedScript; } else { StringBuilder builder = new StringBuilder(); processRegion(builder, scriptInfo, failureInfos); if (numberOfFailures <= failureInfos.size()) { throw new RuntimeException("Script failure detected but not located"); } observeredScript = builder.toString(); } } return observeredScript; }
Source:
<code><START> public static CompositeActionTypeDTO map(final CompositeActionType actionType) { <END> final CompositeActionTypeDTO actionTypeDto = new CompositeActionTypeDTO(); fillProperties(actionType, actionTypeDto); actionTypeDto.inputs = actionType.getInputs(); actionTypeDto.outputs = actionType.getOutputs(); actionTypeDto.children = ActionDTOMapper.map(actionType.getChildren()); return actionTypeDto; }</code><technical_language>If add attribute ActionType (same for condition trigger), is added CompositeActionType is a derived class. a function handles ActionType[DTO] mapping called mapping of a CompositeActionTypeDTO, too? e.g. Java private static <T extends ActionTypeDTO> T map(final ActionType actionType, final T actionTypeDto) { fillProperties(actionType, actionTypeDto); actionTypeDto.inputs = actionType.getInputs(); actionTypeDto.outputs = actionType.getOutputs(); return actionTypeDto; } public static ActionTypeDTO map(final ActionType actionType) { return map(actionType, new ActionTypeDTO()); } public static CompositeActionTypeDTO map(final CompositeActionType actionType) { final CompositeActionTypeDTO actionTypeDto = map(actionType, new CompositeActionTypeDTO()); actionTypeDto.children = ActionDTOMapper.map(actionType.getChildren()); return actionTypeDto; } WDYT</technical_language>

Target:
public static CompositeActionTypeDTO map(final CompositeActionType actionType) { final CompositeActionTypeDTO actionTypeDto = map(actionType, new CompositeActionTypeDTO()); actionTypeDto.children = ActionDTOMapper.map(actionType.getChildren()); return actionTypeDto; }
Source:
<code>public void setTitle(@NonNull final String title) { <START> mToolbarTitle = title.isEmpty() ? getString(R.string.wordpress_as_site_title_when_no_title) : title; <END> if (mToolbar != null) { mToolbar.setTitle(mToolbarTitle); } }</code><technical_language><LINK_0>, add a check fragment is added activity try set title</technical_language>

Target:
public void setTitle(@NonNull final String title) { if (isAdded()) { mToolbarTitle = (title == null || title.isEmpty()) ? getString(R.string.wordpress) : title; if (mToolbar != null) { mToolbar.setTitle(mToolbarTitle); } } }
Source:
<code>public final void setData(String sessionId, String key, Object value) { SessionInfo sessionInfo = getSessionInfo(sessionId); if (sessionInfo == null) { sessionInfo = new SessionInfo(); sessionInfo.contentOfSession.put(ENGINE_SESSION_ID, sessionId); <START> sessionInfo.contentOfSession.put(SOFT_LIMIT_INTERVAL_PARAMETER_NAME, Config.<Integer> getValue(ConfigValues.UserSessionTimeOutInterval)); <END> SessionInfo oldSessionInfo = sessionInfoMap.putIfAbsent(sessionId, sessionInfo); if (oldSessionInfo != null) { sessionInfo = oldSessionInfo; } } sessionInfo.contentOfSession.put(key, value); }</code><technical_language>please reformat. line is long</technical_language>

Target:
protected final void setData(String sessionId, String key, Object value) { SessionInfo sessionInfo = getSessionInfo(sessionId); if (sessionInfo == null) { sessionInfo = new SessionInfo(); sessionInfo.contentOfSession.put(ENGINE_SESSION_ID, sessionId); sessionInfo.contentOfSession.put(SOFT_LIMIT_INTERVAL_PARAMETER_NAME, Config.<Integer> getValue(ConfigValues.UserSessionTimeOutInterval)); SessionInfo oldSessionInfo = sessionInfoMap.putIfAbsent(sessionId, sessionInfo); if (oldSessionInfo != null) { sessionInfo = oldSessionInfo; } } sessionInfo.contentOfSession.put(key, value); }
Source:
<code>private boolean pendingPullRequestExists(final PullRequest pullRequest, final int requestId) { if (pullRequest == null) { LOG.log(Level.FINE, "Pending pull was not found"); return false; } else if (requestId != pullRequest.getRequestId()) { LOG.log(Level.FINE, "Pull request id not matched, received: {0}, actual: {1}", new Object[]{requestId, pullRequest.getRequestId()}); return false; } <START> return true; <END> }</code><technical_language>I missed review, put this return true in else</technical_language>

Target:
private boolean pendingPullRequestExists(final PullRequest pullRequest, final int requestId) { if (pullRequest == null) { LOG.log(Level.FINE, "Pending pull was not found"); return false; } else if (requestId != pullRequest.getRequestId()) { LOG.log(Level.FINE, "Pull request id not matched, received: {0}, actual: {1}", new Object[]{requestId, pullRequest.getRequestId()}); return false; } else { return true; } }
Source:
<code>public Optional<StructureData> fill(DataContainer container, StructureData data) { <START> return Optional.empty(); <END> }</code><technical_language>empty</technical_language>

Target:
public Optional<StructureData> fill(DataContainer container, StructureData data) { checkNotNull(data, "data"); Optional<String> author = container.getString(Keys.STRUCTURE_AUTHOR.getQuery()); if (author.isPresent()) { data = data.set(Keys.STRUCTURE_AUTHOR, author.get()); } Optional<Boolean> ignoreEntities = container.getBoolean(Keys.STRUCTURE_IGNORE_ENTITIES.getQuery()); if (ignoreEntities.isPresent()) { data = data.set(Keys.STRUCTURE_IGNORE_ENTITIES, ignoreEntities.get()); } Optional<Float> integrity = container.getFloat(Keys.STRUCTURE_INTEGRITY.getQuery()); if (integrity.isPresent()) { data = data.set(Keys.STRUCTURE_INTEGRITY, integrity.get()); } Optional<StructureMode> mode = container.getObject(Keys.STRUCTURE_MODE.getQuery(), StructureMode.class); if (mode.isPresent()) { data = data.set(Keys.STRUCTURE_MODE, mode.get()); } Optional<Vector3i> position = container.getObject(Keys.STRUCTURE_POSITION.getQuery(), Vector3i.class); if (position.isPresent()) { data = data.set(Keys.STRUCTURE_POSITION, position.get()); } Optional<Boolean> powered = container.getBoolean(Keys.STRUCTURE_POWERED.getQuery()); if (powered.isPresent()) { data = data.set(Keys.STRUCTURE_POWERED, powered.get()); } Optional<Boolean> showAir = container.getBoolean(Keys.STRUCTURE_SHOW_AIR.getQuery()); if (showAir.isPresent()) { data = data.set(Keys.STRUCTURE_SHOW_AIR, showAir.get()); } Optional<Boolean> showBoundingBox = container.getBoolean(Keys.STRUCTURE_SHOW_BOUNDING_BOX.getQuery()); if (showBoundingBox.isPresent()) { data = data.set(Keys.STRUCTURE_SHOW_BOUNDING_BOX, showBoundingBox.get()); } Optional<Vector3i> size = container.getObject(Keys.STRUCTURE_SIZE.getQuery(), Vector3i.class); if (size.isPresent()) { data = data.set(Keys.STRUCTURE_SIZE, size.get()); } return Optional.of(data); }
Source:
<code>public Environment(@JsonProperty("name") String name, @JsonProperty("profiles") String[] profiles, @JsonProperty("label") String label, @JsonProperty("version") String version, @JsonProperty("state") String state) { super(); this.name = name; this.profiles = profiles; this.label = label; this.version = version; this.state = state; <START> this.cached = false; <END> }</code><technical_language>Is a reason set variable in constructor well</technical_language>

Target:
public Environment(@JsonProperty("name") String name, @JsonProperty("profiles") String[] profiles, @JsonProperty("label") String label, @JsonProperty("version") String version, @JsonProperty("state") String state) { super(); this.name = name; this.profiles = profiles; this.label = label; this.version = version; this.state = state; }
Source:
<code>private SortingCollection<String> makeSortingCollection() { <START> final String parent = System.getProperty("java.io.tmpdir") + "/" + System.getProperty("user.name"); <END> final String child = getClass().getSimpleName(); final File tmpDir = new File(parent, child); IOUtil.deleteDirectoryTree(tmpDir); if (!tmpDir.mkdirs()) { throw new IllegalStateException("Could not create tmpdir: " + tmpDir.getAbsolutePath()); } tmpDir.deleteOnExit(); long maxNamesInRam = Runtime.getRuntime().maxMemory() / 256 / 10; return SortingCollection.newInstance( String.class, new StringCodec(), String::compareTo, maxNamesInRam > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) maxNamesInRam, tmpDir ); }</code><technical_language>please IOUtil.createTempDir</technical_language>

Target:
private SortingCollection<String> makeSortingCollection() { final String name = getClass().getSimpleName(); final File tmpDir = IOUtil.createTempDir(name, null); tmpDir.deleteOnExit(); long maxNamesInRam = Runtime.getRuntime().maxMemory() / 256 / 10; return SortingCollection.newInstance( String.class, new StringCodec(), String::compareTo, (int) Math.min(maxNamesInRam, Integer.MAX_VALUE), tmpDir ); }
Source:
<code>public static Properties defaultProperties() { Properties properties = BaseHttpApiMetadata.defaultProperties(); <START> properties.put(TEMPLATE, "osFamily=UBUNTU,os64Bit=true,osVersionMatches=14.*"); <END> properties.put(TIMEOUT_NODE_RUNNING, 300000); return properties; }</code><technical_language>Ccan default a more modern version</technical_language>

Target:
public static Properties defaultProperties() { Properties properties = BaseHttpApiMetadata.defaultProperties(); properties.put(TEMPLATE, "osFamily=UBUNTU,os64Bit=true,osVersionMatches=16.*"); properties.put(TIMEOUT_NODE_RUNNING, 300000); return properties; }
Source:
<code>public void testVCard() { VCardBean vcard = BEANS.get(VCardBuilder.class) .withDisplayName("displayname") .withName("Samuel", "middlename", "Keusch", "Dr.") <START> .withEmail(VCardBean.PARAM_HOME, "samuel.keusch@bsi-software.com") <END> .withJobTitle("Software Engineer") .withOrganizations("BSI Business Systems Integration AG", "FHNW.ch") .withProductIdentifier("productidentifiert") .withTel(VCardBean.PARAM_WORK, VCardBean.PARAM_CELL, "0772424244") .withAddress(VCardBean.PARAM_HOME, "Bahnhofstrasse", "5612", "Villmergen", "Schweiz") .build(); assertEquals("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "FN:displayname\r\n" + "N:Keusch;Samuel;middlename;Dr.;\r\n" + "EMAIL;TYPE=HOME:samuel.keusch@bsi-software.com\r\n" + "TITLE:Software Engineer\r\n" + "ORG:BSI Business Systems Integration AG;FHNW.ch\r\n" + "PRODID:productidentifiert\r\n" + "TEL;TYPE=WORK,CELL:0772424244\r\n" + "ADR;TYPE=HOME:;;Bahnhofstrasse;Villmergen;;5612;Schweiz\r\n" + "END:VCARD\r\n", new String(vcard.toBytes("utf-8"))); }</code><technical_language>sample names</technical_language>

Target:
public void testVCard() { VCardBean vcard = BEANS.get(VCardBuilder.class) .withDisplayName("displayname") .withName("Tommy", "middlename", "Mustermann", "Dr.") .withEmail(VCardProperties.PARAM_NAME_HOME, "tommy@mustermann.de") .withJobTitle("Software Engineer") .withOrganizations("Mustermann GmbH", "mustermann.de") .withProductIdentifier("productidentifiert") .withTel(VCardProperties.PARAM_NAME_WORK, VCardProperties.PARAM_NAME_CELL, "0776665544") .withAddress(VCardProperties.PARAM_NAME_HOME, "Bahnhofstrasse", "1234", "Entenhausen", "Schweiz") .build(); assertEquals("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "FN:displayname\r\n" + "N:Mustermann;Tommy;middlename;Dr.;\r\n" + "EMAIL;TYPE=HOME:tommy@mustermann.de\r\n" + "TITLE:Software Engineer\r\n" + "ORG:Mustermann GmbH;mustermann.de\r\n" + "PRODID:productidentifiert\r\n" + "TEL;TYPE=WORK,CELL:0776665544\r\n" + "ADR;TYPE=HOME:;;Bahnhofstrasse;Entenhausen;;1234;Schweiz\r\n" + "END:VCARD\r\n", new String(vcard.toBytes("utf-8"))); }
Source:
<code>public ICommandLineInterface getCli() { return new ICommandLineInterface() { @Override public String getName() { return "smoketest"; } @Override public int call(String[] args) { String testFile = System.getProperty("IRIS_DIR")+"/examples/3c273.xml"; if(args.length>0) { try{ Integer timeout = Integer.parseInt(args[0]); test = new SherpaSmokeTest(testFile, timeout); } catch (NumberFormatException ex) { System.out.println(args[0]+" is not a number."); return 1; } } else test = new SherpaSmokeTest(testFile); try { test.runTest(); } catch (Exception ex) { Logger.getLogger(SmokeTest.class.getName()).log(Level.SEVERE, null, ex); } finally { <START> return test.exit(); <END> } } }; }</code><technical_language><LINK_0> catches logs a throwable, pass throwable set failing exit status. sherpasmoketests fail if breaks</technical_language>

Target:
public ICommandLineInterface getCli() { return new ICommandLineInterface() { @Override public String getName() { return "smoketest"; } @Override public int call(String[] args) { String testFile = System.getProperty("IRIS_DIR")+"/examples/3c273.xml"; if(args.length>0) { try{ Integer timeout = Integer.parseInt(args[0]); test = new SherpaSmokeTest(testFile, timeout); } catch (NumberFormatException ex) { System.out.println(args[0]+" is not a number."); return 1; } } else test = new SherpaSmokeTest(testFile); try { test.runTest(); } catch (Throwable ex) { ex.printStackTrace(System.err); } finally { return test.exit(); } } }; }
Source:
<code>public void visitFile(Tree scriptTree) { List<String> lines; try { <START> lines = Files.readLines(getContext().getFile(), charset); <END> for (int i = 0; i < lines.size(); i++) { String line = lines.get(i); if (line.length() > 0 && Pattern.matches("[" + EcmaScriptLexer.WHITESPACE + "]", line.subSequence(line.length() - 1, line.length()))) { getContext().addIssue(this, i + 1, "Remove the useless trailing whitespaces at the end of this line."); } } } catch (IOException e) { LOG.error("Unable to execute rule \"TrailingWhitespace\" for file because of error: {}", getContext().getFile().getName(), e); } }</code><technical_language>@lindamartin I include line in try block</technical_language>

Target:
public void visitFile(Tree scriptTree) { List<String> lines = Collections.emptyList(); try { lines = Files.readLines(getContext().getFile(), charset); } catch (IOException e) { LOG.error("Unable to execute rule \"TrailingWhitespace\" for file because of error: {}", getContext().getFile().getName(), e); } for (int i = 0; i < lines.size(); i++) { String line = lines.get(i); if (line.length() > 0 && Pattern.matches("[" + EcmaScriptLexer.WHITESPACE + "]", line.subSequence(line.length() - 1, line.length()))) { getContext().addIssue(this, i + 1, "Remove the useless trailing whitespaces at the end of this line."); } } }
Source:
<code>public void setBlockSelectionMode(boolean enable) { if (!isBlockSelectionModeSupported()) return; ISourceViewer viewer= getSourceViewer(); if (viewer != null) { StyledText styledText= viewer.getTextWidget(); if (styledText != null) { if (enable) { Font blockFont= JFaceResources.getFont(BLOCK_SELECTION_MODE_FONT); Font normalFont= styledText.getFont(); if (!blockFont.equals(normalFont) && !normalFont.getFontData()[0].equals(blockFont.getFontData()[0])) { setFont(viewer, blockFont); disposeFont(); updateCaret(); } styledText.setWordWrap(false); if (fVerticalRuler != null) { <START> fVerticalRuler.update(); <END> } } styledText.setBlockSelection(enable); if (!enable) { initializeViewerFont(viewer); updateCaret(); if (fWordWrapHint) { styledText.setWordWrap(true); if (fVerticalRuler != null) { fVerticalRuler.update(); } } } } } }</code><technical_language>This happen if word wrap is enabled</technical_language>

Target:
public void setBlockSelectionMode(boolean enable) { if (!isBlockSelectionModeSupported()) return; ISourceViewer viewer= getSourceViewer(); if (viewer != null) { StyledText styledText= viewer.getTextWidget(); if (styledText != null) { if (enable) { Font blockFont= JFaceResources.getFont(BLOCK_SELECTION_MODE_FONT); Font normalFont= styledText.getFont(); if (!blockFont.equals(normalFont) && !normalFont.getFontData()[0].equals(blockFont.getFontData()[0])) { setFont(viewer, blockFont); disposeFont(); updateCaret(); } if (styledText.getWordWrap()) { styledText.setWordWrap(false); if (fVerticalRuler != null) { fVerticalRuler.update(); } } } styledText.setBlockSelection(enable); if (!enable) { initializeViewerFont(viewer); updateCaret(); if (!styledText.getWordWrap() && fIsWordWrapActivated) { styledText.setWordWrap(true); if (fVerticalRuler != null) { fVerticalRuler.update(); } } } } } }
Source:
<code>public void releaseStore(final Store<?, ?> resource) { if (createdStores.remove(resource) == null) { <START> throw new IllegalArgumentException("Given cluster tier is not managed by this provider : " + resource); <END> } ClusteredStore clusteredStore = (ClusteredStore)resource; this.clusteringService.releaseServerStoreProxy(clusteredStore.storeProxy); StatisticsManager.nodeFor(clusteredStore).clean(); tierOperationStatistics.remove(clusteredStore); }</code><technical_language>stick clustered, is client view of</technical_language>

Target:
public void releaseStore(final Store<?, ?> resource) { if (createdStores.remove(resource) == null) { throw new IllegalArgumentException("Given clustered tier is not managed by this provider : " + resource); } ClusteredStore clusteredStore = (ClusteredStore)resource; this.clusteringService.releaseServerStoreProxy(clusteredStore.storeProxy); StatisticsManager.nodeFor(clusteredStore).clean(); tierOperationStatistics.remove(clusteredStore); }
Source:
<code>KeenClient(Builder builder, Environment env) { this.httpHandler = builder.httpHandler; this.jsonHandler = builder.jsonHandler; this.eventStore = builder.eventStore; this.publishExecutor = builder.publishExecutor; if (httpHandler == null || jsonHandler == null || eventStore == null || publishExecutor == null) { setActive(false); } this.baseUrl = KeenConstants.SERVER_ADDRESS; this.globalPropertiesEvaluator = null; this.globalProperties = null; <START> this.builder = builder; <END> if (env.getKeenProjectId() != null) { defaultProject = new KeenProject(env); } }</code><technical_language>This is a good, lightweight hold abstraction provides environment-appropriate (Java vs. Android) behavior. Unfortunately, some downsides. builder is intended references Android Activity/Application Context object. Keeping builder reference mess GC other bad side effects. Plus, sort of spirit of builder pattern</technical_language>

Target:
KeenClient(Builder builder, Environment env) { this.httpHandler = builder.httpHandler; this.jsonHandler = builder.jsonHandler; this.eventStore = builder.eventStore; this.publishExecutor = builder.publishExecutor; this.networkStatusHandler = builder.networkStatusHandler; if (httpHandler == null || jsonHandler == null || eventStore == null || publishExecutor == null) { setActive(false); } this.baseUrl = KeenConstants.SERVER_ADDRESS; this.globalPropertiesEvaluator = null; this.globalProperties = null; if (env.getKeenProjectId() != null) { defaultProject = new KeenProject(env); } }
Source:
<code>public void visitFunctionCall(FunctionCallTree tree) { super.visitFunctionCall(tree); String callee = tree.callee().toString(); <START> if (!this.isExcludedFile() && WRONG_FUNCTIONS.contains(callee.toLowerCase(Locale.ENGLISH))) { <END> String message = String.format(MESSAGE, callee); context().newIssue(this, tree.callee(), message); } }</code><technical_language>remove this</technical_language>

Target:
public void visitFunctionCall(FunctionCallTree tree) { super.visitFunctionCall(tree); String callee = tree.callee().toString(); if (WRONG_FUNCTIONS.contains(callee.toLowerCase(Locale.ENGLISH))) { String message = String.format(MESSAGE, callee); context().newIssue(this, tree.callee(), message); } }
Source:
<code>private void readBytesFromFile(String fileName, byte[] bytes) { try (FileInputStream fos = getApplicationContext().openFileInput(fileName)) { <START> fos.read(bytes); <END> } catch (IOException e) { throw new RuntimeException("Couldn't write to " + fileName, e); } }</code><technical_language>read return bytes asked for..</technical_language>

Target:
private void readBytesFromFile(String fileName, byte[] bytes) { try (FileInputStream fis = openFileInput(fileName)) { int n = 0; while (n < bytes.length) { n += fis.read(bytes, n, bytes.length - n); } } catch (IOException e) { throw new RuntimeException("Couldn't read from " + fileName, e); } }
Source:
<code>private static TableDefinition partitionedTableDefinition() { String createTableDdl = "CREATE TABLE %NAME%(" + "id int," + "name string" + ")" + "PARTITIONED BY (dt string)" + "ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'" + "WITH SERDEPROPERTIES (" + "'field.delim'='\\t'," + "'line.delim'='\\n'," + "'serialization.format'='\\t'" + ")"; <START> return HiveTableDefinition.builder(PARTITIONED_TABLE).setCreateTableDDLTemplate(createTableDdl).setNoData().build(); <END> }</code><technical_language>insert newline .set.. .build</technical_language>

Target:
private static TableDefinition partitionedTableDefinition() { String createTableDdl = "CREATE TABLE %NAME%( " + "id int, " + "name string " + ") " + "PARTITIONED BY (dt string) " + "ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' " + "WITH SERDEPROPERTIES ( " + "'field.delim'='\\t', " + "'line.delim'='\\n', " + "'serialization.format'='\\t' " + ")"; return HiveTableDefinition.builder(PARTITIONED_TABLE_WITH_SERDE) .setCreateTableDDLTemplate(createTableDdl) .setNoData() .build(); }
Source:
<code>public void testSalesforceConnectionPropertiesMigration() throws IOException { Deserialized<SalesforceConnectionProperties> deser = Properties.Helper.fromSerializedPersistent( TestUtils.getResourceAsString(getClass(), "tSalesforceConnectionProperties_621.json"), SalesforceConnectionProperties.class); <START> assertTrue("should be true, but not", deser.migrated); <END> SalesforceConnectionProperties properties = deser.object; String apiVersion = properties.apiVersion.getValue(); assertEquals("\"34.0\"", apiVersion); }</code><technical_language>Label "should true, not" meaningful</technical_language>

Target:
public void testSalesforceConnectionPropertiesMigration() throws IOException { Deserialized<SalesforceConnectionProperties> deser = Properties.Helper.fromSerializedPersistent( TestUtils.getResourceAsString(getClass(), "tSalesforceConnectionProperties_621.json"), SalesforceConnectionProperties.class); assertTrue("the property should be migrated, the migration returned false instead of true", deser.migrated); SalesforceConnectionProperties properties = deser.object; String apiVersion = properties.apiVersion.getValue(); assertEquals("\"34.0\"", apiVersion); }
Source:
<code>public static void showPushNotification(Context context, Intent messageIntent, MixpanelPushNotification mixpanelPushNotification) { Notification notification = mixpanelPushNotification.createNotification(messageIntent); MixpanelNotificationData data = mixpanelPushNotification.getData(); String message = data == null ? "null" : data.getMessage(); MPLog.d(LOGTAG, "MP FCM notification received: " + message); <START> if (notification != null && !mixpanelPushNotification.hasOnTapError) { <END> final NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); if (null != data.getTag()) { notificationManager.notify(data.getTag(), NOTIFICATION_ID, notification); } else { notificationManager.notify(mixpanelPushNotification.notificationId, notification); } } }</code><technical_language>consider a mixpanelPushNotification.isValid() checks for errors</technical_language>

Target:
public static void showPushNotification(Context context, Intent messageIntent, MixpanelPushNotification mixpanelPushNotification) { Notification notification = mixpanelPushNotification.createNotification(messageIntent); MixpanelNotificationData data = mixpanelPushNotification.getData(); String message = data == null ? "null" : data.getMessage(); MPLog.d(LOGTAG, "MP FCM notification received: " + message); if (notification != null) { if (!mixpanelPushNotification.isValid()) { MPLog.e(LOGTAG, "MP FCM notification has error"); } final NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); if (null != data.getTag()) { notificationManager.notify(data.getTag(), NOTIFICATION_ID, notification); } else { notificationManager.notify(mixpanelPushNotification.getNotificationId(), notification); } } }
Source:
<code>public void write(Object datum) throws IOException { if (!opened) { throw new IOException("Writer is not opened"); } result.totalCount++; if (datum == null) { return; } IndexedRecord record = (IndexedRecord) datum; Schema schema = record.getSchema(); Schema.Field idField = schema.getField(idFieldName); if (idField == null) { throw new IOException("Schema does not contain ID field: " + idFieldName); } int idPos = idField.pos(); String id = record.get(idPos).toString(); <START> connection.upsert(id, datum.toString()); <END> }</code><technical_language>datum.toString() suspicious</technical_language>

Target:
public void write(Object datum) throws IOException { if (!opened) { throw new IOException("Writer is not opened"); } result.totalCount++; if (datum == null) { return; } IndexedRecord record = (IndexedRecord) datum; Schema schema = record.getSchema(); Schema.Field idField = schema.getField(idFieldName); if (idField == null) { throw new IOException("Schema does not contain ID field: " + idFieldName); } int idPos = idField.pos(); Object id = record.get(idPos); if (id == null) { throw new IOException("ID field is null: " + idField.name()); } try { connection.upsert(id.toString(), datum.toString()); result.successCount++; } catch (Exception e) { result.rejectCount++; throw new IOException("Failed to upsert value - " + datum.toString(), e); } }
Source:
<code>static <T> Future<T> fromCompletableFuture(ExecutorService executorService, CompletableFuture<T> future) { Objects.requireNonNull(executorService, "executorService is null"); Objects.requireNonNull(future, "future is null"); <START> FutureImpl<T> newFuture = new FutureImpl<>(executorService); <END> future.handle((t, throwable) -> newFuture .tryComplete(throwable == null ? Try.success(t) : Try.failure(throwable instanceof CompletionException ? throwable.getCause() : throwable))); return newFuture; }</code><technical_language>minor: final</technical_language>

Target:
static <T> Future<T> fromCompletableFuture(ExecutorService executorService, CompletableFuture<T> future) { Objects.requireNonNull(executorService, "executorService is null"); Objects.requireNonNull(future, "future is null"); final Promise<T> promise = Promise.make(); future.handle((t, err) -> err == null ? promise.success(t) : promise.failure(err)); return promise.future(); }
Source:
<code>public String getDisplayName() { switch (this) { case PREPARING: return "Preparing device"; case WAITING: <START> return "waiting for device"; <END> case UNINSTALL: return "Uninstall apps"; case INSTALL: return "Install apps"; case RUNNING: return "Running session"; case SENDING_RESULTS: return "Sending results"; case PROCESSING_RESULTS: return "Processing results"; default: return ""; } }</code><technical_language>Inconsistent Upper case in description</technical_language>

Target:
public String getDisplayName() { switch (this) { case PREPARING: return "Preparing device"; case WAITING: return "Waiting for device"; case UNINSTALL: return "Uninstall apps"; case INSTALL: return "Install apps"; case RUNNING: return "Running session"; case SENDING_RESULTS: return "Sending results"; case PROCESSING_RESULTS: return "Processing results"; default: return ""; } }
Source:
<code>public void waitForRevokeLeader(long timeout) throws Exception { final LeaderInformation revoke = revokeQueue.poll(timeout, TimeUnit.MILLISECONDS); if (revoke == null || !revoke.equals(LeaderInformation.empty())) { <START> throw new TimeoutException("Contender was not revoked within " + timeout + "ms"); <END> } isLeader = false; }</code><technical_language>for revokeQueue. If time left, happen leader revoked</technical_language>

Target:
public void waitForRevokeLeader(long timeout) throws Exception { throwExceptionIfNotNull(); final String errorMsg = "Contender was not revoked within " + timeout + "ms"; CommonTestUtils.waitUntilCondition( () -> { final LeaderInformation leader = leaderEventQueue.poll(timeout, TimeUnit.MILLISECONDS); return leader != null && leader.isEmpty(); }, Deadline.fromNow(Duration.ofMillis(timeout)), errorMsg); isLeader = false; }
Source:
<code>private void serviceV2() throws IOException { if (biDirectionalPipe) { for (String s : v2CapabilityAdvertisement) { pckOut.writeString(s); } pckOut.end(); } try { while (true) { String command; try { command = pckIn.readString(); } catch (EOFException eof) { break; } while (pckIn.readString() != PacketLineIn.DELIM) { } if <START> (command.equals("command=ls-refs")) <END> { lsRefsV2(); } else { throw new PackProtocolException("unknown command " + command); } } } finally { rawOut.stopBuffering(); } }</code><technical_language>Define a string constant for this</technical_language>

Target:
private void serviceV2() throws IOException { if (biDirectionalPipe) { for (String s : v2CapabilityAdvertisement) { pckOut.writeString(s + "\n"); } pckOut.end(); } try { while (true) { String command; try { command = pckIn.readString(); } catch (EOFException eof) { break; } if (command.equals("command=" + CAPABILITY_LS_REFS)) { lsRefsV2(); } else { throw new PackProtocolException("unknown command " + command); } } } finally { rawOut.stopBuffering(); } }
Source:
<code>private RepositoriesView getRepositoriesView() { return (RepositoriesView) PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage() <START> .findViewReference(RepositoriesView.VIEW_ID).getView(false); <END> }</code><technical_language>Returns null if repo view exists</technical_language>

Target:
private RepositoriesView getRepositoriesView() { IWorkbenchPage page = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage(); IViewReference ref = page.findViewReference(RepositoriesView.VIEW_ID); return ref == null ? null : (RepositoriesView) ref.getView(false); }
Source:
<code>private boolean isDomainReportedAsProblematic(VDSDomainsData tempData, boolean isLog) { if (tempData.getCode() != 0) { if (isLog) { log.errorFormat("Domain {0} was reported with error code {1}", tempData.getDomainId(), tempData.getCode()); } return true; } if (tempData.getLastCheck() > Config .<Double> GetValue(ConfigValues.MaxStorageVdsTimeoutCheckSec)) { if (isLog) { <START> log.errorFormat("Domain {0} was reported with too big lastCheck {1}", <END> tempData.getDomainId(), tempData.getLastCheck()); } return true; } return false; }</code><technical_language>Domain ->Storage Domain message is clear</technical_language>

Target:
private boolean isDomainReportedAsProblematic(VDSDomainsData tempData, boolean isLog) { if (tempData.getCode() != 0) { if (isLog) { log.errorFormat("Domain {0} was reported with error code {1}", tempData.getDomainId(), tempData.getCode()); } return true; } if (tempData.getLastCheck() > Config .<Double> GetValue(ConfigValues.MaxStorageVdsTimeoutCheckSec)) { if (isLog) { log.errorFormat("Domain {0} check timeot {1} is too big", tempData.getDomainId(), tempData.getLastCheck()); } return true; } return false; }