auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void bindTo(MeterRegistry registry) { stopTimer = Timer.builder(workspaceMetric("stop.time")) .description("The time of workspace stop") .tags(withStandardTags("result", "success")) .publishPercentileHistogram() .sla(Duration.ofSeconds(10)) .minimumExpectedValue(Duration.ofSeconds(10)) .maximumExpectedValue(Duration.ofMinutes(15)) .register(registry); <START> eventService.subscribe(this::handleWorkspaceStatusChange, WorkspaceStatusEvent.class); <END> }</code><technical_language>I STARTING -> STOPPING transition is valid. In case of transition record start of stop time issue unnecessary warning workspace is stopped</technical_language>

Target:
public void bindTo(MeterRegistry registry) { stopTimer = Timer.builder(workspaceMetric("stop.time")) .description("The time of workspace stop") .tags(withStandardTags("result", "success")) .register(registry); eventService.subscribe(this::handleWorkspaceStatusChange, WorkspaceStatusEvent.class); }
Source:
<code>public synchronized void refresh(HelixDataAccessor accessor) { long startTime = System.currentTimeMillis(); Set<HelixConstants.ChangeType> propertyRefreshed = super.doRefresh(accessor); if (propertyRefreshed.contains(HelixConstants.ChangeType.IDEAL_STATE) || propertyRefreshed.contains(HelixConstants.ChangeType.LIVE_INSTANCE) || propertyRefreshed.contains(HelixConstants.ChangeType.INSTANCE_CONFIG) || propertyRefreshed.contains(HelixConstants.ChangeType.RESOURCE_CONFIG)) { clearCachedResourceAssignments(); } refreshCustomizedStateConfig(accessor); _customizedStateCache.refresh(accessor, _liveInstanceCache.getPropertyMap()); <START> refreshExternalViews(accessor); <END> refreshTargetExternalViews(accessor); refreshCustomizedViewMap(accessor); LogUtil.logInfo(logger, getClusterEventId(), String.format( "END: ResourceControllerDataProvider.refresh() for cluster %s, started at %d took %d for %s pipeline", getClusterName(), startTime, System.currentTimeMillis() - startTime, getPipelineName())); dumpDebugInfo(); }</code><technical_language>consider moving 3 calculations update stages in async thread. leave for now. revisit anyway</technical_language>

Target:
public synchronized void refresh(HelixDataAccessor accessor) { long startTime = System.currentTimeMillis(); Set<HelixConstants.ChangeType> propertyRefreshed = super.doRefresh(accessor); if (propertyRefreshed.contains(HelixConstants.ChangeType.IDEAL_STATE) || propertyRefreshed.contains(HelixConstants.ChangeType.LIVE_INSTANCE) || propertyRefreshed.contains(HelixConstants.ChangeType.INSTANCE_CONFIG) || propertyRefreshed.contains(HelixConstants.ChangeType.RESOURCE_CONFIG)) { clearCachedResourceAssignments(); } refreshCustomizedStateConfig(accessor); _customizedStateCache.setAggregationEnabledTypes(_aggregationEnabledTypes); _customizedStateCache.refresh(accessor, getLiveInstanceCache().getPropertyMap()); refreshExternalViews(accessor); refreshTargetExternalViews(accessor); refreshCustomizedViewMap(accessor); LogUtil.logInfo(logger, getClusterEventId(), String.format( "END: ResourceControllerDataProvider.refresh() for cluster %s, started at %d took %d for %s pipeline", getClusterName(), startTime, System.currentTimeMillis() - startTime, getPipelineName())); dumpDebugInfo(); }
Source:
<code>public Future<Void> refreshToken() { return (Future<Void>) executor.submit(new Runnable() { <START> @Override <END> public void run() { try { receiveTokenFromKeycloak("grant_type=refresh_token&refresh_token=" + connectResult.getRefresh_token() + "&client_id=" + appName); } catch (IOException e) { throw new DolphinRuntimeException("Error in security", e); } } }); }</code><technical_language>lamda here</technical_language>

Target:
public Future<Void> refreshToken() { return (Future<Void>) executor.submit(() -> { try { receiveTokenFromKeycloak("grant_type=refresh_token&refresh_token=" + connectResult.getRefresh_token() + "&client_id=" + appName); } catch (IOException e) { throw new DolphinRuntimeException("Error in security", e); } }); }
Source:
<code>private static boolean checkOperand(Expression operand, IsExpression isExpr, SubscriptionContext ctx) { Optional<List<Tree>> secondariesOpt = findIssueForOperand(operand); <START> secondariesOpt.ifPresent(secondaryPositions -> { <END> Token notToken = isExpr.notToken(); PreciseIssue preciseIssue = notToken == null ? ctx.addIssue(isExpr.operator(), MESSAGE_IS) : ctx.addIssue(isExpr.operator(), notToken, MESSAGE_IS_NOT); for (Tree secondary : secondaryPositions) { preciseIssue.secondary(secondary, MESSAGE_SECONDARY); } }); return secondariesOpt.isPresent(); }</code><technical_language>Nitpick rename secondaryPositions secondaryLocations for consistency lexicon</technical_language>

Target:
private static boolean checkOperand(Expression operand, IsExpression isExpr, SubscriptionContext ctx) { Optional<List<Tree>> secondariesOpt = findIssueForOperand(operand); secondariesOpt.ifPresent(secondaryLocations -> { Token notToken = isExpr.notToken(); PreciseIssue preciseIssue = notToken == null ? ctx.addIssue(isExpr.operator(), MESSAGE_IS) : ctx.addIssue(isExpr.operator(), notToken, MESSAGE_IS_NOT); for (Tree secondary : secondaryLocations) { preciseIssue.secondary(secondary, MESSAGE_SECONDARY); } }); return secondariesOpt.isPresent(); }
Source:
<code>public static ReadCountCollection removeTargetsWithTooManyZeros(final ReadCountCollection readCounts, final int maximumTargetZeros, final Logger logger) { final RealMatrix counts = readCounts.counts(); final Set<Target> targetsToKeep = IntStream.range(0, counts.getRowDimension()).boxed() .filter(i -> countZeroes(counts.getRow(i)) <= maximumTargetZeros) .map(i -> readCounts.targets().get(i)).collect(Collectors.toSet()); final int targetsToDropCount = readCounts.targets().size() - targetsToKeep.size(); if (targetsToDropCount == 0) { logger.info( <START> String.format("No target drop due to too many zero counts; there is no target with a large number of columns with zero counts (<= %d of %d) ", maximumTargetZeros, readCounts.columnNames().size())); <END> return readCounts; } else if (targetsToDropCount == readCounts.targets().size()) { throw new UserException.BadInput("the number of zeros per target in the input is too large resulting in all targets being dropped"); } else { logger.info( String.format("Some targets dropped, %d of %d, as they have too many zeros (> %d of %d)." , targetsToDropCount, readCounts.columnNames().size(), maximumTargetZeros, readCounts.columnNames().size())); return readCounts.subsetTargets(targetsToKeep); } }</code><technical_language>**targets dropped** due zero counts; part of this sentence sounds redundant</technical_language>

Target:
public static ReadCountCollection removeTargetsWithTooManyZeros(final ReadCountCollection readCounts, final int maximumTargetZeros, final Logger logger) { final RealMatrix counts = readCounts.counts(); final Set<Target> targetsToKeep = IntStream.range(0, counts.getRowDimension()).boxed() .filter(i -> countZeroes(counts.getRow(i)) <= maximumTargetZeros) .map(i -> readCounts.targets().get(i)).collect(Collectors.toSet()); final int targetsToDropCount = readCounts.targets().size() - targetsToKeep.size(); if (targetsToDropCount == 0) { logger.info( String.format("There are no targets with large number of columns with zero counts (<= %d of %d) to drop", maximumTargetZeros, readCounts.columnNames().size())); return readCounts; } else if (targetsToDropCount == readCounts.targets().size()) { throw new UserException.BadInput("the number of zeros per target in the input is too large resulting " + "in all targets being dropped"); } else { final double droppedPercentage = ((double)(targetsToDropCount) / readCounts.targets().size()) * 100; logger.info(String.format("Some targets dropped (%d out of %d, %.2f%%) as they had too many zeros (> %d of %d).", targetsToDropCount, readCounts.targets().size(), droppedPercentage, maximumTargetZeros, readCounts.columnNames().size())); return readCounts.subsetTargets(targetsToKeep); } }
Source:
<code>private static Class<?> getFirstGenericParameter(final Type type, final int nestedDepth) { int cDepth = 0; Type tType = type; for (int cDept = 0; cDept < nestedDepth; cDept++) { if (!(tType instanceof ParameterizedType)) throw new IllegalStateException(String.format("Sub type at nesting level %d of %s is expected to be generic", cDepth, type)); <START> tType = ((ParameterizedType) tType).getActualTypeArguments()[0]; <END> } if (tType instanceof ParameterizedType) return (Class<?>) ((ParameterizedType) tType).getRawType(); else if (tType instanceof Class) return (Class<?>) tType; throw new UnsupportedOperationException("Unsupported type " + tType); }</code><technical_language>I be: tType = ((ParameterizedType) tType).getActualTypeArguments()[cDept] BTW: In a separate branch working strategic solution compare generic types. refactor this code common feature</technical_language>

Target:
private static Class<?> getFirstGenericParameter(final Type type, final int nestedDepth) { int cDepth = 0; Type tType = type; for (int cDept = 0; cDept < nestedDepth; cDept++) { if (!(tType instanceof ParameterizedType)) throw new IllegalStateException(String.format("Sub type at nesting level %d of %s is expected to be generic", cDepth, type)); tType = ((ParameterizedType) tType).getActualTypeArguments()[cDept]; } if (tType instanceof ParameterizedType) return (Class<?>) ((ParameterizedType) tType).getRawType(); else if (tType instanceof Class) return (Class<?>) tType; throw new UnsupportedOperationException("Unsupported type " + tType); }
Source:
<code>public void getPatientIdentifiers_shouldFetchAllPatientIdentifiersBelongToGivenPatient() throws Exception { Patient patientWithId2 = Context.getPatientService().getPatient(2); List<PatientIdentifier> patientIdentifiers = dao.getPatientIdentifiers(null, new ArrayList<PatientIdentifierType>(), new ArrayList<Location>(), Collections.singletonList(patientWithId2), null); Assert.assertEquals(patientWithId2.getActiveIdentifiers().size(), patientIdentifiers.size()); <START> Assert.assertEquals("101", patientIdentifiers.get(0).getIdentifier()); <END> Assert.assertEquals("101-6", patientIdentifiers.get(1).getIdentifier()); }</code><technical_language>@akolodziejski please hamcrest matchers. nicer. write assertThat(patientIdentifiers, containsInAnyOrder(hasIdentifier("101"), hasIdentifier("101-6"))); hasIdentifier returns matcher. if questions</technical_language>

Target:
public void getPatientIdentifiers_shouldFetchAllPatientIdentifiersBelongToGivenPatient() throws Exception { Patient patientWithId2 = Context.getPatientService().getPatient(2); List<PatientIdentifier> patientIdentifiers = dao.getPatientIdentifiers(null, new ArrayList<PatientIdentifierType>(), new ArrayList<Location>(), Collections.singletonList(patientWithId2), null); MatcherAssert.assertThat(patientIdentifiers, containsInAnyOrder(hasIdentifier("101"), hasIdentifier("101-6"))); }
Source:
<code>public void testGetSplitsCombineInTwo() throws Exception { config.set(DatasourceInputFormat.CONF_MAX_SPLIT_SIZE, "6"); List<InputSplit> splits = new DatasourceInputFormat().setSupplier(testFormatter).getSplits(context); Assert.assertEquals(2, splits.size()); Assert.assertEquals( Sets.newHashSet(segments.get(0), segments.get(2)), Sets.newHashSet((((DatasourceInputSplit) splits.get(0)).getSegments())) ); Assert.assertArrayEquals(new String[]{"s2", "s1", "s3"}, splits.get(0).getLocations()); Assert.assertEquals( Sets.newHashSet(segments.get(1)), Sets.newHashSet((((DatasourceInputSplit) splits.get(1)).getSegments())) ); <START> System.out.println(Arrays.toString(splits.get(1).getLocations())); <END> Assert.assertArrayEquals(new String[]{"s1", "s2"}, splits.get(1).getLocations()); }</code><technical_language>pls remove, or, i guess need some IDE automation remove System.out.println(..)s :-)</technical_language>

Target:
public void testGetSplitsCombineInTwo() throws Exception { config.set(DatasourceInputFormat.CONF_MAX_SPLIT_SIZE, "6"); List<InputSplit> splits = new DatasourceInputFormat().setSupplier(testFormatter).getSplits(context); Assert.assertEquals(2, splits.size()); Assert.assertEquals( Sets.newHashSet(segments.get(0), segments.get(2)), Sets.newHashSet((((DatasourceInputSplit) splits.get(0)).getSegments())) ); Assert.assertArrayEquals(new String[]{"s2", "s1", "s3"}, splits.get(0).getLocations()); Assert.assertEquals( Sets.newHashSet(segments.get(1)), Sets.newHashSet((((DatasourceInputSplit) splits.get(1)).getSegments())) ); Assert.assertArrayEquals(new String[]{"s1", "s2"}, splits.get(1).getLocations()); }
Source:
<code>public void aRelayStatus(final Map<String, String> settings) { final Ssld ssld = this.ssldRepository.findByDeviceIdentification( getString(settings, Keys.KEY_DEVICE_IDENTIFICATION, Defaults.DEFAULT_DEVICE_IDENTIFICATION)); final List<DeviceOutputSetting> dosList = new ArrayList<>(); dosList.add(new DeviceOutputSetting(1, 1, RelayType.TARIFF, "test-relay")); dosList.add(new DeviceOutputSetting(2, 2, RelayType.LIGHT, "test-relay")); ssld.updateOutputSettings(dosList); this.relayStatusRepository.save(new RelayStatus(ssld, 1, false, DateTime.now().toDate())); <START> this.relayStatusRepository.save(new RelayStatus(ssld, 2, true, DateTime.now().toDate())); <END> }</code><technical_language>this work want test a device a configuration for relays</technical_language>

Target:
public void aRelayStatus(final Map<String, String> settings) throws Exception { final Ssld ssld = this.ssldRepository.findByDeviceIdentification( getString(settings, Keys.KEY_DEVICE_IDENTIFICATION, Defaults.DEFAULT_DEVICE_IDENTIFICATION)); final String[] deviceOutputSettings = getString(settings, Keys.DEVICE_OUTPUT_SETTINGS, Defaults.DEVICE_OUTPUT_SETTINGS).replaceAll(" ", "").split(Keys.SEPARATOR_SEMICOLON), relayStatuses = getString(settings, Keys.RELAY_STATUSES, Defaults.RELAY_STATUSES).replaceAll(" ", "") .split(Keys.SEPARATOR_SEMICOLON); final List<DeviceOutputSetting> dosList = new ArrayList<>(); for (final String dos : deviceOutputSettings) { final String[] deviceOutputSetting = dos.split(Keys.SEPARATOR_COMMA); dosList.add(new DeviceOutputSetting(Integer.parseInt(deviceOutputSetting[0]), Integer.parseInt(deviceOutputSetting[1]), RelayType.valueOf(deviceOutputSetting[2]), deviceOutputSetting[3])); } ssld.updateOutputSettings(dosList); for (final String rs : relayStatuses) { final String[] relayStatus = rs.split(Keys.SEPARATOR_COMMA); this.relayStatusRepository.save(new RelayStatus(ssld, Integer.parseInt(relayStatus[0]), Boolean.parseBoolean(relayStatus[1]), getDateTime2(relayStatus[2], DateTime.now()).toDate())); } }
Source:
<code>private boolean fetchJobResult(TDJobOperator job) { Optional<ArrayValue> firstRow = job.getResult(ite -> ite.hasNext() ? Optional.of(ite.next()) : Optional.absent()); if (!firstRow.isPresent()) { return false; } ArrayValue row = firstRow.get(); if (row.size() < 1) { throw new TaskExecutionException("Got empty row in result of query", ConfigElement.empty()); } Value firstCol = row.get(0); return !firstCol.isNilValue() && <START> !(firstCol.isBooleanValue() && !firstCol.asBooleanValue().getBoolean()); <END> }</code><technical_language>I some people familiar MySQL "select 1" instead of "select true" mistake MySQL boolean type. adding this condition well?: !(firstCol.isIntegerValue() && !firstCol.asIntegerValue().equals(BigInteger.valueOf(0)))</technical_language>

Target:
private boolean fetchJobResult(TDJobOperator job) { Optional<ArrayValue> firstRow = job.getResult(ite -> ite.hasNext() ? Optional.of(ite.next()) : Optional.absent()); if (!firstRow.isPresent()) { return false; } ArrayValue row = firstRow.get(); if (row.size() < 1) { throw new TaskExecutionException("Got empty row in result of query", ConfigElement.empty()); } Value firstCol = row.get(0); return isTruthy(firstCol); }
Source:
<code>public boolean setDebugSession(String sessionId) { boolean changed = true; if (m_sessionState != null && ! m_sessionState.getSessionID().equals(sessionId)) { disposeLoadMeterTimer(); <START> m_sessionState.removeServiceEventListener(fEventListener); <END> m_sessionState.dispose(); m_sessionState = null; changed = true; } if (m_sessionState == null && sessionId != null) { m_sessionState = new DSFSessionState(sessionId); m_sessionState.addServiceEventListener(fEventListener); initializeLoadMeterTimer(); changed = true; } if (changed) update(); return changed; }</code><technical_language>set new m_cpuContextsCache m_coreContextsCache null</technical_language>

Target:
public boolean setDebugSession(String sessionId) { boolean changed = true; if (m_sessionState != null && ! m_sessionState.getSessionID().equals(sessionId)) { disposeLoadMeterTimer(); m_cpuContextsCache = null; m_coreContextsCache = null; m_sessionState.removeServiceEventListener(fEventListener); m_sessionState.dispose(); m_sessionState = null; changed = true; } if (m_sessionState == null && sessionId != null) { m_sessionState = new DSFSessionState(sessionId); m_sessionState.addServiceEventListener(fEventListener); initializeLoadMeterTimer(); changed = true; } if (changed) update(); return changed; }
Source:
<code>public boolean hasPermission( Authentication authentication, Object targetDomainObject, Object permission) { if (authorizationServiceFacade == null) { authorizationServiceFacade = AuthorizationServiceFacade.instance(); } final IAuthorizationPrincipal principal = getAuthorizationPrincipal(authentication); String targetId = null; if (targetDomainObject instanceof String) { targetId = (String) targetDomainObject; } else if (targetDomainObject instanceof JsonEntityBean) { targetId = ((JsonEntityBean) targetDomainObject).getTargetString(); } AuthorizableActivity activity = null; if (permission instanceof AuthorizableActivity) { activity = (AuthorizableActivity) permission; } else if (permission instanceof String) { String activityName = (String) permission; activity = getViewActivity(activityName, (JsonEntityBean) targetDomainObject); } else { throw new RuntimeException( "Unable to determine permission target id for type " + targetDomainObject.getClass()); } <START> logger.warn(String.format("BEACH TEST: in hasPermissions for owner=[%s],activity=[%s],targetId=[%s]", activity.getOwnerFname(), activity.getActivityFname(), targetId)); <END> if (activity != null) { final boolean hasPermission = principal.hasPermission( activity.getOwnerFname(), activity.getActivityFname(), targetId); return hasPermission; } else { return false; } }</code><technical_language>warning: Left test log</technical_language>

Target:
public boolean hasPermission( Authentication authentication, Object targetDomainObject, Object permission) { if (authorizationServiceFacade == null) { authorizationServiceFacade = AuthorizationServiceFacade.instance(); } final IAuthorizationPrincipal principal = getAuthorizationPrincipal(authentication); String targetId = null; if (targetDomainObject instanceof String) { targetId = (String) targetDomainObject; } else if (targetDomainObject instanceof JsonEntityBean) { targetId = ((JsonEntityBean) targetDomainObject).getTargetString(); } AuthorizableActivity activity = null; if (permission instanceof AuthorizableActivity) { activity = (AuthorizableActivity) permission; } else if (permission instanceof String) { String activityName = (String) permission; activity = getViewActivity(activityName, (JsonEntityBean) targetDomainObject); } else { throw new RuntimeException( "Unable to determine permission target id for type " + targetDomainObject.getClass()); } if (this.logger.isTraceEnabled()) { logger.trace( String.format( "In hasPermission() - owner=[%s], activity=[%s], targetId=[%s] ", activity.getOwnerFname(), activity.getActivityFname(), targetId)); } if (activity != null) { final boolean hasPermission = principal.hasPermission( activity.getOwnerFname(), activity.getActivityFname(), targetId); return hasPermission; } else { return false; } }
Source:
<code>private void registerClientResources(Bundle clientBundle) { Hashtable<String, Object> properties = new Hashtable<>(); properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN, <START> "/VAADIN/static/client*"); <END> servletClientRegistration.compareAndSet(null, clientBundle.getBundleContext().registerService(Servlet.class, new ResourceServlet(clientBundle, "/META-INF/resources/VAADIN/static/client"), properties)); }</code><technical_language>![MAJOR](<LINK_1> 'Severity: MAJOR') Replace synchronized class "Hashtable" unsynchronized "HashMap". [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
private void registerClientResources(Bundle clientBundle) { Hashtable<String, Object> properties = new Hashtable<>(); properties.put("osgi.http.whiteboard.servlet.pattern", "/VAADIN/static/client/*"); servletClientRegistration.compareAndSet(null, clientBundle.getBundleContext().registerService(Servlet.class, new ResourceServlet(clientBundle, "/META-INF/resources/VAADIN/static/client"), properties)); }
Source:
<code>private boolean reduceSharedPools(Pool pool) { newConsumed = pool.getConsumed(); long over = pool.getConsumed() - pool.getQuantity(); for (Pool sPool : sharedPools.get(pool)) { if (over > 0) { long excessCount = sPool.getQuantity() - sPool.getConsumed(); <START> long newQuantity = 0; <END> if (excessCount > 0) { Entitlement shareEnt = sPool.getSourceEntitlement(); if (over >= excessCount) { newQuantity = sPool.getQuantity() - excessCount; over = over - excessCount; newConsumed -= excessCount; } else { newQuantity = shareEnt.getQuantity() - over; newConsumed -= over; over = 0L; } addEntitlementToAdjust(shareEnt, newQuantity); } } } return over > 0; }</code><technical_language>long newQuantity;</technical_language>

Target:
private void reduceSharedPools(Pool pool) { long over = pool.getConsumed() - pool.getQuantity(); long newConsumed = poolNewConsumed.get(pool); for (Pool sPool : sharedPools.get(pool)) { if (over > 0) { long excessCount = sPool.getQuantity() - sPool.getConsumed(); long newQuantity; if (excessCount > 0) { Entitlement shareEnt = sPool.getSourceEntitlement(); if (over >= excessCount) { newQuantity = sPool.getQuantity() - excessCount; over = over - excessCount; newConsumed -= excessCount; } else { newQuantity = shareEnt.getQuantity() - over; newConsumed -= over; over = 0L; } addEntitlementToAdjust(shareEnt, newQuantity); } } } poolNewConsumed.put(pool, newConsumed); }
Source:
<code>private String getGitReviewBranchName() { String branchName = null; String gitReviewFilePath = StringUtils.join( new String[]{ProjectManager.getInstance().getOpenProjects()[0].getBasePath(), GITREVIEW_FILENAME}, File.separator); File gitReviewFile = new File(gitReviewFilePath); if (gitReviewFile.exists() && gitReviewFile.isFile()) { try { FileInputStream fileInputStream = new FileInputStream(gitReviewFilePath); Properties properties = new Properties(); properties.load(fileInputStream); branchName = properties.getProperty("defaultbranch"); <START> fileInputStream.close(); <END> } catch (IOException e) { } } return branchName; }</code><technical_language>Move this finally block of this try-catch</technical_language>

Target:
private Optional<String> getGitReviewBranchName() { Optional<String> branchName = Optional.absent(); DataContext dataContext = DataManager.getInstance().getDataContextFromFocus().getResult(); Optional<Project> openedProject = Optional.fromNullable(CommonDataKeys.PROJECT.getData(dataContext)); if (openedProject.isPresent()) { String gitReviewFilePath = Joiner.on(File.separator).join( openedProject.get().getBasePath(), GITREVIEW_FILENAME); File gitReviewFile = new File(gitReviewFilePath); if (gitReviewFile.exists() && gitReviewFile.isFile()) { FileInputStream fileInputStream = null; try { fileInputStream = new FileInputStream(gitReviewFilePath); Properties properties = new Properties(); properties.load(fileInputStream); branchName = Optional.fromNullable(properties.getProperty("defaultbranch")); } catch (IOException e) { } finally { if (fileInputStream != null) { try { fileInputStream.close(); } catch (IOException e) { } } } } } return branchName; }
Source:
<code>public void checkOutputSpecs(JobContext jobContext) { View<E> target = load(jobContext); Configuration conf = Hadoop.JobContext.getConfiguration.invoke(jobContext); switch (conf.getEnum(KITE_WRITE_MODE, WriteMode.DEFAULT)) { case APPEND: break; case OVERWRITE: if (!target.isEmpty()) { target.deleteAll(); } break; default: case DEFAULT: boolean isReady = false; if(target instanceof ReadiableView) { isReady = ((ReadiableView)target).isReady(); } <START> if (!target.isEmpty() || isReady) { <END> throw new DatasetException( "View is not empty or has been signaled as ready: " + target); } break; } }</code><technical_language>Check isReady first</technical_language>

Target:
public void checkOutputSpecs(JobContext jobContext) { View<E> target = load(jobContext); Configuration conf = Hadoop.JobContext.getConfiguration.invoke(jobContext); switch (conf.getEnum(KITE_WRITE_MODE, WriteMode.DEFAULT)) { case APPEND: break; case OVERWRITE: if (!target.isEmpty()) { target.deleteAll(); } break; default: case DEFAULT: boolean isReady = false; if (target instanceof Signalable) { isReady = ((Signalable)target).isReady(); } if (isReady || !target.isEmpty()) { throw new DatasetException( "View is not empty or has been signaled as ready: " + target); } break; } }
Source:
<code>@Override public RecordWriter<K,VariantContextWritable> getRecordWriter( TaskAttemptContext ctx) throws IOException { Configuration conf = ctx.getConfiguration(); boolean isCompressed = getCompressOutput(ctx); CompressionCodec codec = null; String extension = ""; if (isCompressed) { Class<? extends CompressionCodec> codecClass = <START> getOutputCompressorClass(ctx, GzipCodec.class); <END> codec = ReflectionUtils.newInstance(codecClass, conf); extension = codec.getDefaultExtension(); } Path file = getDefaultWorkFile(ctx, extension); if (!isCompressed) { return getRecordWriter(ctx, file); } else { FileSystem fs = file.getFileSystem(conf); return getRecordWriter(ctx, codec.createOutputStream(fs.create(file))); } }</code><technical_language>GzipCodec unnatural default, for BCF. BGZFCodec a choice for for VCF BCF</technical_language>

Target:
@Override public RecordWriter<K,VariantContextWritable> getRecordWriter( TaskAttemptContext ctx) throws IOException { Configuration conf = ctx.getConfiguration(); boolean isCompressed = getCompressOutput(ctx); CompressionCodec codec = null; String extension = ""; if (isCompressed) { Class<? extends CompressionCodec> codecClass = getOutputCompressorClass(ctx, BGZFCodec.class); codec = ReflectionUtils.newInstance(codecClass, conf); extension = codec.getDefaultExtension(); } Path file = getDefaultWorkFile(ctx, extension); if (!isCompressed) { return getRecordWriter(ctx, file); } else { FileSystem fs = file.getFileSystem(conf); return getRecordWriter(ctx, codec.createOutputStream(fs.create(file))); } }
Source:
<code>public List<Identity> getAllowedIdentities() { <START> return null; <END> }</code><technical_language>supposed return null here? empty list</technical_language>

Target:
public List<Identity> getAllowedIdentities() { return new ArrayList<>(); }
Source:
<code>private URI getRedirectUrl(String domainName) throws EWSHttpException, XMLStreamException, IOException, ServiceLocalException, URISyntaxException { String url = String.format(AutodiscoverLegacyHttpUrl, "autodiscover." + domainName); traceMessage(TraceFlags.AutodiscoverConfiguration, String.format("Trying to get Autodiscover redirection URL from %s.", url)); HttpWebRequest request = null; try { request = new HttpClientWebRequest(httpClient, httpContext); <START> if(getWebProxy() != null ){ <END> request.setProxy(getWebProxy()); } try { request.setUrl(URI.create(url).toURL()); } catch (MalformedURLException e) { String strErr = String.format("Incorrect format : %s", url); throw new ServiceLocalException(strErr); } request.setRequestMethod("GET"); request.setAllowAutoRedirect(false); request.setAllowAuthentication(false); prepareCredentials(request); request.prepareConnection(); try { request.executeRequest(); } catch (IOException e) { traceMessage(TraceFlags.AutodiscoverConfiguration, "No Autodiscover redirection URL was returned."); return null; } OutParam<URI> outParam = new OutParam<URI>(); if (tryGetRedirectionResponse(request, outParam)) { return outParam.getParam(); } } finally { if (request != null) { try { request.close(); } catch (Exception e) { } } } traceMessage(TraceFlags.AutodiscoverConfiguration, "No Autodiscover redirection URL was returned."); return null; }</code><technical_language>need a null check [HttpClientWebRequest](<LINK_0> is this (machtes occurrences)</technical_language>

Target:
private URI getRedirectUrl(String domainName) throws EWSHttpException, XMLStreamException, IOException, ServiceLocalException, URISyntaxException { String url = String.format(AutodiscoverLegacyHttpUrl, "autodiscover." + domainName); traceMessage(TraceFlags.AutodiscoverConfiguration, String.format("Trying to get Autodiscover redirection URL from %s.", url)); HttpWebRequest request = null; try { request = new HttpClientWebRequest(httpClient, httpContext); request.setProxy(getWebProxy()); try { request.setUrl(URI.create(url).toURL()); } catch (MalformedURLException e) { String strErr = String.format("Incorrect format : %s", url); throw new ServiceLocalException(strErr); } request.setRequestMethod("GET"); request.setAllowAutoRedirect(false); request.setAllowAuthentication(false); prepareCredentials(request); request.prepareConnection(); try { request.executeRequest(); } catch (IOException e) { traceMessage(TraceFlags.AutodiscoverConfiguration, "No Autodiscover redirection URL was returned."); return null; } OutParam<URI> outParam = new OutParam<URI>(); if (tryGetRedirectionResponse(request, outParam)) { return outParam.getParam(); } } finally { if (request != null) { try { request.close(); } catch (Exception e) { } } } traceMessage(TraceFlags.AutodiscoverConfiguration, "No Autodiscover redirection URL was returned."); return null; }
Source:
<code>IkeNotifyPayload(boolean isCritical, byte[] payloadBody) throws IkeException { super(PAYLOAD_TYPE_NOTIFY, isCritical); ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); protocolId = Byte.toUnsignedInt(inputBuffer.get()); spiSize = inputBuffer.get(); notifyType = Short.toUnsignedInt(inputBuffer.getShort()); if (spiSize == SPI_LEN_IPSEC) { if (protocolId != PROTOCOL_ID_AH && protocolId != PROTOCOL_ID_ESP) { throw new InvalidSyntaxException( "Expected Procotol ID AH(2) or ESP(3): Protocol ID is " + protocolId); } if (notifyType != NOTIFY_TYPE_INVALID_SELECTORS && notifyType != NOTIFY_TYPE_CHILD_SA_NOT_FOUND <START> && notifyType != NOTIFY_TYPE_REKEY_SA) { <END> throw new InvalidSyntaxException( "Expected Child SA concerned Notify Type: Notify Type is " + notifyType); } spi = inputBuffer.getInt(); } else if (spiSize == SPI_LEN_NOT_INCLUDED) { if (protocolId != PROTOCOL_ID_CURRENT_IKE_SA) { throw new InvalidSyntaxException( "Expected Procotol ID for current IKE(0): Protocol ID is " + protocolId); } if (notifyType == NOTIFY_TYPE_INVALID_SELECTORS || notifyType == NOTIFY_TYPE_CHILD_SA_NOT_FOUND) { throw new InvalidSyntaxException( "Expected IKE SA concerned Notify Type: Notify Type is " + notifyType); } spi = 0; } else { throw new InvalidSyntaxException("Invalid SPI Size: " + spiSize); } notifyData = new byte[payloadBody.length - NOTIFY_HEADER_LEN]; inputBuffer.get(notifyData); }</code><technical_language>This time for a switch statement a Set<> of types check against</technical_language>

Target:
IkeNotifyPayload(boolean isCritical, byte[] payloadBody) throws IkeException { super(PAYLOAD_TYPE_NOTIFY, isCritical); ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); protocolId = Byte.toUnsignedInt(inputBuffer.get()); spiSize = inputBuffer.get(); notifyType = Short.toUnsignedInt(inputBuffer.getShort()); if (spiSize == SPI_LEN_IPSEC) { if (protocolId != PROTOCOL_ID_AH && protocolId != PROTOCOL_ID_ESP) { throw new InvalidSyntaxException( "Expected Procotol ID AH(2) or ESP(3): Protocol ID is " + protocolId); } if (!CHILD_CONCERNED_NOTIFY_TYPES.contains(notifyType)) { throw new InvalidSyntaxException( "Expected Child SA concerned Notify Type: Notify Type is " + notifyType); } spi = inputBuffer.getInt(); } else if (spiSize == SPI_LEN_NOT_INCLUDED) { if (protocolId != PROTOCOL_ID_CURRENT_IKE_SA) { throw new InvalidSyntaxException( "Expected Procotol ID for current IKE(0): Protocol ID is " + protocolId); } if (notifyType == NOTIFY_TYPE_INVALID_SELECTORS || notifyType == NOTIFY_TYPE_CHILD_SA_NOT_FOUND) { throw new InvalidSyntaxException( "Expected IKE SA concerned Notify Type: Notify Type is " + notifyType); } spi = 0; } else { throw new InvalidSyntaxException("Invalid SPI Size: " + spiSize); } notifyData = new byte[payloadBody.length - NOTIFY_HEADER_LEN]; inputBuffer.get(notifyData); }
Source:
<code>ColumnManagementView getConditionsPanel() { if (conditionsPanel == null) { conditionsPanel = new ColumnManagementView(getPresenter()); <START> } <END> return conditionsPanel; }</code><technical_language>Personally, I Optional is more expressive: java ColumnManagementView getActionsPanel() { actionsPanel = Optional.ofNullable(actionsPanel).orElse(newColumnManagementView()); return actionsPanel; }</technical_language>

Target:
ColumnManagementView getConditionsPanel() { conditionsPanel = Optional.ofNullable(conditionsPanel).orElse(new ColumnManagementView(getPresenter())); return conditionsPanel; }
Source:
<code>public void testTrigonometricIdentities() throws Throwable { <START> Random random = new Random(); <END> double theta = 90 * random.nextDouble(); String sinExpression = "(" + "sin-degrees" + " " + theta + ")"; Object sinResult = scheme.eval(sinExpression); String cosExpression = "(" + "cos-degrees" + " " + theta + ")"; Object cosResult = scheme.eval(cosExpression); String tanExpression = "(" + "tan-degrees" + " " + theta + ")"; Object tanResult = scheme.eval(tanExpression); double sin = Double.parseDouble(String.valueOf(sinResult)); double cos = Double.parseDouble(String.valueOf(cosResult)); double tan = Double.parseDouble(String.valueOf(tanResult)); assertEquals(tan * cos, sin, DELTA); }</code><technical_language>Indentation is here. 4 spaces, 6</technical_language>

Target:
public void testTrigonometricIdentities() throws Throwable { Random random = new Random(); double theta = 90 * random.nextDouble(); String sinExpression = "(" + "sin-degrees" + " " + theta + ")"; Object sinResult = scheme.eval(sinExpression); String cosExpression = "(" + "cos-degrees" + " " + theta + ")"; Object cosResult = scheme.eval(cosExpression); String tanExpression = "(" + "tan-degrees" + " " + theta + ")"; Object tanResult = scheme.eval(tanExpression); String cosComplementExpression = "(" + "cos-degrees" + " " + (90 - theta) + ")"; Object cosComplementResult = scheme.eval(cosComplementExpression); double sin = Double.parseDouble(String.valueOf(sinResult)); double cos = Double.parseDouble(String.valueOf(cosResult)); double tan = Double.parseDouble(String.valueOf(tanResult)); double cosComplement = Double.parseDouble(String.valueOf(cosComplementResult)); assertEquals(sin, cosComplement, DELTA); assertEquals((Math.pow(sin,2) + Math.pow(cos,2)), 1, DELTA); assertEquals(tan * cos, sin, DELTA); }
Source:
<code>protected ITimeGraphState createTimeGraphState(ITmfStateInterval interval) { ITmfStateSystem stateSystem = getAnalysisModule().getStateSystem(); long startTime = interval.getStartTime(); long duration = interval.getEndTime() - startTime + 1; <START> Integer threadQuark = getThreadQuarkOnCpuAtTime(startTime, interval.getAttribute()); if (threadQuark != null && stateSystem != null) { try { Object value = stateSystem.querySingleState(startTime, threadQuark).getValue(); if (value != null && value instanceof Integer) { if ((int) value !=0) { return new TimeGraphState(startTime, duration, (int) value, value.toString()); } return new TimeGraphState(startTime, duration, (int) value, ""); } } catch (StateSystemDisposedException e) { } } return <END> new TimeGraphState(startTime, duration, Integer.MIN_VALUE); }</code><technical_language>if want current thread's TID, find in cpu's Attributes.CURRENT_THREAD attribute</technical_language>

Target:
protected ITimeGraphState createTimeGraphState(ITmfStateInterval interval) { ITmfStateSystem stateSystem = getAnalysisModule().getStateSystem(); long startTime = interval.getStartTime(); long duration = interval.getEndTime() - startTime + 1; try { if (stateSystem != null) { Integer threadQuark = stateSystem.getQuarkRelative(interval.getAttribute(), Attributes.CURRENT_THREAD); Object value = stateSystem.querySingleState(startTime, threadQuark).getValue(); if (value != null && value instanceof Integer) { if ((int) value != 0) { return new TimeGraphState(startTime, duration, (int) value, value.toString()); } return new TimeGraphState(startTime, duration, (int) value, ""); } } } catch (StateSystemDisposedException | AttributeNotFoundException e) { } return new TimeGraphState(startTime, duration, Integer.MIN_VALUE); }
Source:
<code>public SELF isEqualTo(String stringTemplate, Object ... args){ String expected = String.format(stringTemplate, args); <START> this.comparables.assertEqual(info, actual, expected); <END> return super.isEqualTo(expected); }</code><technical_language>delete this line call super.isEqualTo(expected); required assertion</technical_language>

Target:
public SELF isEqualTo(String stringTemplate, Object ... args){ String expected = String.format(stringTemplate, args); return super.isEqualTo(expected); }
Source:
<code>public void shouldNotSetRemovalTime_HistoricProcessInstancePermissionsDisabled() { testRule.getProcessEngineConfiguration() .setEnableHistoricInstancePermissions(false); String processInstanceId = testRule.process().userTask().deploy().start(); Authorization authorization = authorizationService.createNewAuthorization(Authorization.AUTH_TYPE_GRANT); authorization.setResource(Resources.HISTORIC_PROCESS_INSTANCE); authorization.setResourceId(processInstanceId); authorization.setUserId("foo"); authorizationService.saveAuthorization(authorization); HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); testRule.syncExec( historyService.setRemovalTimeToHistoricProcessInstances() .absoluteRemovalTime(REMOVAL_TIME) .byQuery(query) .executeAsync() ); authorization = authorizationService.createAuthorizationQuery() .resourceType(Resources.HISTORIC_PROCESS_INSTANCE) .singleResult(); assertThat(authorization.getRemovalTime()).isNull(); <START> testRule.clearAuthorization(); <END> }</code><technical_language>@After method clears authorizations if assert statement fails</technical_language>

Target:
public void shouldNotSetRemovalTime_HistoricProcessInstancePermissionsDisabled() { testRule.getProcessEngineConfiguration() .setEnableHistoricInstancePermissions(false); String processInstanceId = testRule.process().userTask().deploy().start(); Authorization authorization = authorizationService.createNewAuthorization(Authorization.AUTH_TYPE_GRANT); authorization.setResource(Resources.HISTORIC_PROCESS_INSTANCE); authorization.setResourceId(processInstanceId); authorization.setUserId("foo"); authorizationService.saveAuthorization(authorization); HistoricProcessInstanceQuery query = historyService.createHistoricProcessInstanceQuery(); testRule.syncExec( historyService.setRemovalTimeToHistoricProcessInstances() .absoluteRemovalTime(REMOVAL_TIME) .byQuery(query) .executeAsync() ); authorization = authorizationService.createAuthorizationQuery() .resourceType(Resources.HISTORIC_PROCESS_INSTANCE) .singleResult(); assertThat(authorization.getRemovalTime()).isNull(); }
Source:
<code><START> private int getAveRtts(List<Integer> rtt) { <END> double sum = 0; for (Integer i : rtt) { sum += i; } return (int) sum / rtt.size(); }</code><technical_language>static</technical_language>

Target:
private static int getAveRtts(List<Integer> rtt) { double sum = 0; for (Integer i : rtt) { sum += i; } return (int) sum / rtt.size(); }
Source:
<code>private void addAnnotationToStore(CFStore store, AnnotationMirror anno, Node node) { for (Node internal : splitAssignments(node)) { Receiver rec = FlowExpressions.internalReprOf(analysis.getTypeFactory(), internal); CFValue currentValueFromStore; if (CFAbstractStore.canInsertReceiver(rec)) { currentValueFromStore = store.getValue(rec); } else { currentValueFromStore = null; } AnnotationMirror currentAnno = (currentValueFromStore == null ? atypefactory.UNKNOWNVAL : getValueAnnotation(currentValueFromStore)); AnnotationMirror newAnno = hierarchy.greatestLowerBound(anno, currentAnno); store.insertValue(rec, newAnno); if (node instanceof FieldAccessNode) { refineArrayAtLengthAccess((FieldAccessNode) internal, store); } else if (node instanceof MethodInvocationNode) { MethodInvocationNode miNode = (MethodInvocationNode) node; if (atypefactory .getMethodIdentifier() .isStringLengthMethod(miNode.getTarget().getMethod())) { refineStringAtLengthInvocation(miNode, store); } else if (atypefactory .getMethodIdentifier() .isArrayGetLengthMethod(miNode.getTarget().getMethod())) { refineArrayAtGetLengthInvocation(miNode, store); <START> } <END> } } }</code><technical_language>checking for in place refineStringAtLengthInvocation refineArrayAtGetLengthInvocation called, I suggest creating refineAtLengthInvocation method dispatches methods (or inlines logic)</technical_language>

Target:
private void addAnnotationToStore(CFStore store, AnnotationMirror anno, Node node) { for (Node internal : splitAssignments(node)) { JavaExpression je = JavaExpression.fromNode(analysis.getTypeFactory(), internal); CFValue currentValueFromStore; if (CFAbstractStore.canInsertJavaExpression(je)) { currentValueFromStore = store.getValue(je); } else { currentValueFromStore = null; } AnnotationMirror currentAnno = (currentValueFromStore == null ? atypeFactory.UNKNOWNVAL : getValueAnnotation(currentValueFromStore)); AnnotationMirror newAnno = hierarchy.greatestLowerBound(anno, currentAnno); store.insertValue(je, newAnno); if (node instanceof FieldAccessNode) { refineArrayAtLengthAccess((FieldAccessNode) internal, store); } else if (node instanceof MethodInvocationNode) { MethodInvocationNode miNode = (MethodInvocationNode) node; refineAtLengthInvocation(miNode, store); } } }
Source:
<code>public void shouldRespond_412_WhenSecondRefundRequestAmountAvailableMismatches() { Long refundAmount = 50L; ValidatableResponse validatableResponse = postRefundFor(defaultTestCharge.getExternalChargeId(), refundAmount, defaultTestCharge.getAmount()); String refundId = assertRefundResponseWith(refundAmount, validatableResponse, ACCEPTED.getStatusCode()); validatableResponse = postRefundFor(defaultTestCharge.getExternalChargeId(), refundAmount, defaultTestCharge.getAmount()); validatableResponse.statusCode(PRECONDITION_FAILED.getStatusCode()); List<Map<String, Object>> refundsFoundByChargeId = databaseTestHelper.getRefundsByChargeId(defaultTestCharge.getChargeId()); assertThat(refundsFoundByChargeId.size(), is(1)); assertThat(refundsFoundByChargeId, hasItems(aRefundMatching(refundId, is(notNullValue()), defaultTestCharge.getChargeId(), refundAmount, "REFUNDED"))); <START> assertRefundsHistoryInDBForSuccessfulOrPartialRefund(defaultTestCharge); <END> }</code><technical_language>this deleted is asserted in shouldBeAbleToRequestARefund_partialAmount test is sufficient. need overboard here</technical_language>

Target:
public void shouldRespond_412_WhenSecondRefundRequestAmountAvailableMismatches() { Long refundAmount = 50L; ValidatableResponse validatableResponse = postRefundFor(defaultTestCharge.getExternalChargeId(), refundAmount, defaultTestCharge.getAmount()); String refundId = assertRefundResponseWith(refundAmount, validatableResponse, ACCEPTED.getStatusCode()); validatableResponse = postRefundFor(defaultTestCharge.getExternalChargeId(), refundAmount, defaultTestCharge.getAmount()); validatableResponse.statusCode(PRECONDITION_FAILED.getStatusCode()); List<Map<String, Object>> refundsFoundByChargeId = databaseTestHelper.getRefundsByChargeId(defaultTestCharge.getChargeId()); assertThat(refundsFoundByChargeId.size(), is(1)); assertThat(refundsFoundByChargeId, hasItems(aRefundMatching(refundId, is(notNullValue()), defaultTestCharge.getChargeId(), refundAmount, "REFUNDED"))); assertRefundsHistoryInOrderInDBForSuccessfulOrPartialRefund(defaultTestCharge); }
Source:
<code>public void testUpdateTemplateTagInfo(){ assertEquals(0, templateResponse.getTags().size()); _templateJoinDaoImpl.updateTemplateTagInformation(template, templateResponse); assertEquals(1, templateResponse.getTags().size()); <START> } <END></code><technical_language>Hi, @nvazquez. I a mistake in test, testing if method inserted a tag not, I this test needs verify if template inserted in templateResponse is passed in param of method. do checking if variable in templates equals. problem in other tests cases. Ty</technical_language>

Target:
public void testUpdateTemplateTagInfo(){ testUpdateTagInformation(_templateJoinDaoImpl, template, templateResponse); }
Source:
<code>public void testRetryLogic(int numOfRetries) throws Exception { AzureBlobFileSystem fs = this.getFileSystem(); Configuration config = new Configuration(this.getRawConfiguration()); String accountName = config.get("fs.azure.abfs.account.name"); config.set("fs.azure.account.auth.type." + accountName, "Custom"); config.set("fs.azure.account.oauth.provider.type." + accountName, "org.apache.hadoop.fs" + ".azurebfs.oauth2.RetryTestTokenProvider"); config.set("fs.azure.io.retry.max.retries", Integer.toString(numOfRetries)); config.set("fs.azure.createRemoteFileSystemDuringInitialization", "false"); fs = (AzureBlobFileSystem) FileSystem.newInstance(fs.getUri(), config); RetryTestTokenProvider.ResetStatusToFirstTokenFetch(); try { fs.getFileStatus(new Path("/")); <START> } catch (Exception ex) { <END> } Assert.assertTrue( "Number of token fetch retries (" + RetryTestTokenProvider.reTryCount + ") done, does not match with max " + "retry count configured (" + numOfRetries + ")", RetryTestTokenProvider.reTryCount == numOfRetries); }</code><technical_language>is guaranteed is exception. "org.apache.hadoop.test.LambdaTestUtils.intercept" for exception check</technical_language>

Target:
public void testRetryLogic(int numOfRetries) throws Exception { AzureBlobFileSystem fs = this.getFileSystem(); Configuration config = new Configuration(this.getRawConfiguration()); String accountName = config.get("fs.azure.abfs.account.name"); config.set("fs.azure.account.auth.type." + accountName, "Custom"); config.set("fs.azure.account.oauth.provider.type." + accountName, "org.apache.hadoop.fs" + ".azurebfs.oauth2.RetryTestTokenProvider"); config.set("fs.azure.io.retry.max.retries", Integer.toString(numOfRetries)); config.set("fs.azure.createRemoteFileSystemDuringInitialization", "false"); final AzureBlobFileSystem fs1 = (AzureBlobFileSystem) FileSystem.newInstance(fs.getUri(), config); RetryTestTokenProvider.ResetStatusToFirstTokenFetch(); intercept(Exception.class, ()-> { fs1.getFileStatus(new Path("/")); }); Assert.assertTrue( "Number of token fetch retries (" + RetryTestTokenProvider.reTryCount + ") done, does not match with max " + "retry count configured (" + numOfRetries + ")", RetryTestTokenProvider.reTryCount == numOfRetries); }