auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private boolean testVerticesEqual(final List<Vertex> vertecies, final List<Vertex> loadedVertecies) { for(int i=0; i<vertecies.size(); i++) { final Vertex vertex = vertecies.get(i); final Vertex loadedVertex = loadedVertecies.get(i); Assert.assertEquals(vertex.getSchema(), loadedVertex.getSchema()); Assert.assertEquals(vertex.getVertexType(), loadedVertex.getVertexType()); if (vertex.getAttributes() instanceof SourceInfo) { final SourceInfo sourceInfo = (SourceInfo) vertex.getAttributes(); final SourceInfo loadedSourceInfo = (SourceInfo) loadedVertex.getAttributes(); Assert.assertEquals(sourceInfo.getSchema(), loadedSourceInfo.getSchema()); Assert.assertEquals(sourceInfo.getSourceType(), loadedSourceInfo.getSourceType()); Assert.assertEquals(sourceInfo.getSourceConfiguration().toString(), loadedSourceInfo.getSourceConfiguration().toString()); Assert.assertEquals(sourceInfo.getWatermarkType(), loadedSourceInfo.getWatermarkType()); Assert.assertTrue(valuesEquals((Map) sourceInfo.getWatermarkConfiguration(), (Map) loadedSourceInfo.getWatermarkConfiguration())); } else { Assert.assertEquals(vertex.getAttributes().toString(), loadedVertex.getAttributes().toString()); } } <START> return true; <END> }</code><technical_language>This function returns true</technical_language>

Target:
private void testVerticesEqual(final List<Vertex> vertecies, final List<Vertex> loadedVertecies) { for(int i=0; i<vertecies.size(); i++) { final Vertex vertex = vertecies.get(i); final Vertex loadedVertex = loadedVertecies.get(i); Assert.assertEquals(vertex.getSchema(), loadedVertex.getSchema()); Assert.assertEquals(vertex.getVertexType(), loadedVertex.getVertexType()); if (vertex.getAttributes() instanceof SourceInfo) { final SourceInfo sourceInfo = (SourceInfo) vertex.getAttributes(); final SourceInfo loadedSourceInfo = (SourceInfo) loadedVertex.getAttributes(); final Map<String, Object> stringConf = new HashMap<>(); for (final Map.Entry<CharSequence, Object> entry : loadedSourceInfo.getWatermarkConfiguration().entrySet()) { stringConf.put(entry.getKey().toString(), entry.getValue()); } Assert.assertEquals(sourceInfo.getSchema(), loadedSourceInfo.getSchema()); Assert.assertEquals(sourceInfo.getSourceType(), loadedSourceInfo.getSourceType()); Assert.assertEquals(sourceInfo.getSourceConfiguration().toString(), loadedSourceInfo.getSourceConfiguration().toString()); Assert.assertEquals(sourceInfo.getWatermarkType(), loadedSourceInfo.getWatermarkType()); Assert.assertEquals(sourceInfo.getWatermarkConfiguration(), stringConf); } else { Assert.assertEquals(vertex.getAttributes().toString(), loadedVertex.getAttributes().toString()); } } }
Source:
<code>public synchronized void start() { if (mIsStarted || !isSupportedOnThisDevice()) { return; } mIsStarted = true; if (mTelephonyManager == null) { if (Build.VERSION.SDK_INT >= 18 ) { mGetAllInfoCellScanner = new GetAllCellInfoScannerMr2(); } else { mGetAllInfoCellScanner = new GetAllCellInfoScannerDummy(); } mTelephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if (mTelephonyManager == null) { return; } mPhoneType = mTelephonyManager.getPhoneType(); if (mPhoneType == TelephonyManager.PHONE_TYPE_NONE) { return; } if (mPhoneType != TelephonyManager.PHONE_TYPE_GSM && mPhoneType != TelephonyManager.PHONE_TYPE_CDMA) { <START> throw new UnsupportedOperationException("Unexpected Phone Type: " + mPhoneType); <END> } } mPhoneStateListener = new PhoneStateListener() { @Override public void onSignalStrengthsChanged(SignalStrength ss) { if (ss.isGsm()) { mSignalStrength = ss.getGsmSignalStrength(); } else { mCdmaDbm = ss.getCdmaDbm(); } } }; mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS); }</code><technical_language>throwing in this condition</technical_language>

Target:
public synchronized void start() { if (mIsStarted || !isSupportedOnThisDevice()) { return; } mIsStarted = true; if (mTelephonyManager == null) { if (Build.VERSION.SDK_INT >= 18 ) { mGetAllInfoCellScanner = new GetAllCellInfoScannerMr2(); } else { mGetAllInfoCellScanner = new GetAllCellInfoScannerDummy(); } mTelephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if (mTelephonyManager == null) { return; } mPhoneType = mTelephonyManager.getPhoneType(); if (mPhoneType == TelephonyManager.PHONE_TYPE_NONE || mPhoneType == TelephonyManager.PHONE_TYPE_SIP) { return; } } mPhoneStateListener = new PhoneStateListener() { @Override public void onSignalStrengthsChanged(SignalStrength ss) { if (ss.isGsm()) { mSignalStrength = ss.getGsmSignalStrength(); } else { mCdmaDbm = ss.getCdmaDbm(); } } }; mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS); }
Source:
<code>private void rescheduleNextRowTask() { if (nextRowFuture != null) { nextRowFuture.cancel(false); } lastRowEmittedAtMillis = System.currentTimeMillis(); nextRowFuture = NEXT_ROW_MONITOR_EXECUTOR_SERVICE.scheduleAtFixedRate( <START> () -> { <END> long cellCount = (rowInProgress != null) ? rowInProgress.cellCount : 0; long secondsSinceLastRowEmitted = (System.currentTimeMillis() - lastRowEmittedAtMillis) / 1000; if (!recievedFirstRow) { LOG.warn( "No rows emitted for " + secondsSinceLastRowEmitted + " seconds for a NEW Read request (Time to First Byte). " + "Current Rowmerger state: " + state.name() + ", Cells in current row: " + cellCount); } else { LOG.warn( "No rows emitted for " + secondsSinceLastRowEmitted + " seconds. Current Rowmerger state: " + state.name() + ", Cells in current row: " + cellCount); } }, NEXT_ROW_THRESHOLD_SECONDS, NEXT_ROW_THRESHOLD_SECONDS, TimeUnit.SECONDS); }</code><technical_language>please switch this new Runnable(... revert compile source change</technical_language>

Target:
private void rescheduleNextRowTask() { try { nextRowMonitorReschedulingcounter++; if (nextRowMonitorReschedulingcounter % 20 == 0) { LOG.warn("RowMerger processed %d rows", nextRowMonitorReschedulingcounter - 1); } if (nextRowFuture != null) { nextRowFuture.cancel(false); } lastRowEmittedAtMillis = System.currentTimeMillis(); } catch (Exception e) { LOG.warn("Exception while scheduling NextRowFutureRunnable ", e); } finally { nextRowFuture = NEXT_ROW_MONITOR_EXECUTOR_SERVICE.scheduleAtFixedRate( new Runnable() { @Override public void run() { try { long cellCount = (rowInProgress != null) ? rowInProgress.cellCount : 0; long secondsSinceLastRowEmitted = (System.currentTimeMillis() - lastRowEmittedAtMillis) / 1000; if (!receivedFirstRow) { LOG.warn( "No rows emitted for " + secondsSinceLastRowEmitted + " seconds for a NEW Read request (Time to First Byte). " + "Current Rowmerger state: " + state.name() + ", Cells in current row: " + cellCount); } else { LOG.warn( "No rows emitted for " + secondsSinceLastRowEmitted + " seconds. Current Rowmerger state: " + state.name() + ", Cells in current row: " + cellCount); } } catch (Exception e) { LOG.warn("Exception in NextRowFutureRunnable ", e); } } }, NEXT_ROW_THRESHOLD_SECONDS, NEXT_ROW_THRESHOLD_SECONDS, TimeUnit.SECONDS); } }
Source:
<code>private void createDirectoryWithNFiles(String directory, int n) throws ExecutionException, InterruptedException { final List<Future<Void>> tasks = new ArrayList<>(); ExecutorService es = Executors.newFixedThreadPool(10); for (int i = 0; i < n; i++) { final Path fileName = new Path("/" + directory + "/test" + i); <START> Callable<Void> callable = new Callable<Void>() { <END> @Override public Void call() throws Exception { touch(fileName); return null; } }; tasks.add(es.submit(callable)); } for (Future<Void> task : tasks) { task.get(); } es.shutdownNow(); }</code><technical_language>that;s a lambda expression, able es.submit(() -> { touch(filename); return null; }</technical_language>

Target:
private void createDirectoryWithNFiles(String directory, int n) throws ExecutionException, InterruptedException { final List<Future<Void>> tasks = new ArrayList<>(); ExecutorService es = Executors.newFixedThreadPool(10); for (int i = 0; i < n; i++) { final Path fileName = new Path("/" + directory + "/test" + i); tasks.add(es.submit(() -> { touch(fileName); return null; })); } for (Future<Void> task : tasks) { task.get(); } es.shutdownNow(); }
Source:
<code>public static Object invokeMethod(final Object object, final boolean forceAccess, final String methodName, Object[] args, Class<?>[] parameterTypes) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { parameterTypes = ArrayUtils.nullToEmpty(parameterTypes); args = ArrayUtils.nullToEmpty(args); final String messagePrefix; final Method method; if (forceAccess) { messagePrefix = "No such method: "; method = getMatchingMethod(object.getClass(), methodName, parameterTypes); if (method != null) { <START> method.setAccessible(true); <END> } } else { messagePrefix = "No such accessible method: "; method = getMatchingAccessibleMethod(object.getClass(), methodName, parameterTypes); } if (method == null) { throw new NoSuchMethodException(messagePrefix + methodName + "() on object: " + object.getClass().getName()); } return method.invoke(object, args); }</code><technical_language>For FieldUtils is this jira issue: <LINK_0> "FieldUtils methods leak accessible flags" requests visibility of a field restored field is written. visibility of method restored is invoked? do think</technical_language>

Target:
public static Object invokeMethod(final Object object, final boolean forceAccess, final String methodName, Object[] args, Class<?>[] parameterTypes) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { parameterTypes = ArrayUtils.nullToEmpty(parameterTypes); args = ArrayUtils.nullToEmpty(args); final String messagePrefix; Method method = null; boolean isOriginallyAccessible = false; Object result = null; try { if (forceAccess) { messagePrefix = "No such method: "; method = getMatchingMethod(object.getClass(), methodName, parameterTypes); if (method != null) { isOriginallyAccessible = method.isAccessible(); if (!isOriginallyAccessible) { method.setAccessible(true); } } } else { messagePrefix = "No such accessible method: "; method = getMatchingAccessibleMethod(object.getClass(), methodName, parameterTypes); } if (method == null) { throw new NoSuchMethodException(messagePrefix + methodName + "() on object: " + object.getClass().getName()); } args = toVarArgs(method, args); result = method.invoke(object, args); } finally { if (method != null && forceAccess && method.isAccessible() != isOriginallyAccessible) { method.setAccessible(isOriginallyAccessible); } } return result; }
Source:
<code>public void updatePassword(@ApiParam(value = "New password", required = true) @FormParam("password") String password) throws NotFoundException, ServerException, ConflictException { <START> if (password == null || password.isEmpty()) { <END> throw new ConflictException("Password required"); } if (password.length() < 8) { throw new ConflictException("Password should contain at least 8 characters"); } int numOfLetters = 0, numOfDigits = 0; for (byte passwordByte : password.getBytes()) { char passwordChar = (char)passwordByte; if (Character.isDigit(passwordChar)) { numOfDigits++; } if (Character.isLetter(passwordChar)) { numOfLetters++; } } if (numOfDigits == 0 || numOfLetters == 0) { throw new ConflictException("Password should contain letters and at least one digit"); } final User user = userDao.getById(currentUser().getId()); user.setPassword(password); userDao.update(user); }</code><technical_language><code>password.isEmpty()</code> is excessive check. ## WHY? If password is <code>null</code> client "Password required" is correct message, <i>"Password 8 characters"</i> is! check password length twice</technical_language>

Target:
public void updatePassword(@ApiParam(value = "New password", required = true) @FormParam("password") String password) throws NotFoundException, ServerException, ConflictException { if (password == null) { throw new ConflictException("Password required"); } if (password.length() < 8) { throw new ConflictException("Password should contain at least 8 characters"); } int numOfLetters = 0; int numOfDigits = 0; for (char passwordChar : password.toCharArray()) { if (Character.isDigit(passwordChar)) { numOfDigits++; } if (Character.isLetter(passwordChar)) { numOfLetters++; } } if (numOfDigits == 0 || numOfLetters == 0) { throw new ConflictException("Password should contain letters and digits"); } final User user = userDao.getById(currentUser().getId()); user.setPassword(password); userDao.update(user); }
Source:
<code>public static AggregateCursor of(LocalDate date) { OffsetDateTime lastUpdate = date.atStartOfDay().atOffset(ZoneOffset.UTC); <START> String cursorXml = String.format("<cursor xmlns=\"<LINK_0>\">" + <END> "<attributeName>_LAST_UPDATE_DATE</attributeName>" + "<attributeValue>%s</attributeValue>" + "<uriLastReturnedValue/>" + "<isForwardCursor>true</isForwardCursor>" + "</cursor>", lastUpdate.format(ISO_OFFSET_DATE_TIME) ); return new AggregateCursor(cursorXml, Optional.of(lastUpdate), Optional.empty()); }</code><technical_language>remove this duplication, please? <img width="2476" alt="Screen Shot 2019-06-30 11 02 01 AM" src="<LINK_1>"> /** * Returns a synthetic Cursor instance provided values. */ public static AggregateCursor of(OffsetDateTime lastUpdate, String lastReturnedValue) { String cursorXml = getCursorXml(lastUpdate, lastReturnedValue); return new AggregateCursor(cursorXml, Optional.of(lastUpdate), Optional.of(lastReturnedValue)); } /** * Returns a synthetic Cursor instance provided values. */ public static AggregateCursor of(LocalDate date) { OffsetDateTime lastUpdate = date.atStartOfDay().atOffset(ZoneOffset.UTC); String cursorXml = getCursorXml(lastUpdate, ""); return new AggregateCursor(cursorXml, Optional.of(lastUpdate), Optional.empty()); } private static String getCursorXml(OffsetDateTime lastUpdate, String lastReturnedValue) { return String.format("<cursor xmlns=\"<LINK_0>\">" + "<attributeName>_LAST_UPDATE_DATE</attributeName>" + "<attributeValue>%s</attributeValue>" + "<uriLastReturnedValue>%s</uriLastReturnedValue>" + "<isForwardCursor>true</isForwardCursor>" + "</cursor>", lastUpdate.format(ISO_OFFSET_DATE_TIME), lastReturnedValue); }</technical_language>

Target:
public static AggregateCursor of(LocalDate date) { OffsetDateTime lastUpdate = date.atStartOfDay().atOffset(ZoneOffset.UTC); Optional<String> lastUri = Optional.empty(); return new AggregateCursor(buildCursorXml(lastUpdate, lastUri), Optional.of(lastUpdate), lastUri); }
Source:
<code>private List<Token> checkOnZenodoToken(User user) { List<Token> tokens = tokenDAO.findZenodoByUserId(user.getId()); if (!tokens.isEmpty()) { Token zenodoToken = tokens.get(0); DateTime updateTime = new DateTime(zenodoToken.getDbUpdateDate()); <START> if (updateTime.plusHours(1).isBeforeNow()) { <END> LOG.info("Refreshing the Zenodo Token"); String refreshUrl = zenodoUrl + "/oauth/token"; String payload = "client_id=" + zenodoClientID + "&client_secret=" + zenodoClientSecret + "&grant_type=refresh_token&refresh_token=" + zenodoToken.getRefreshToken(); refreshToken(refreshUrl, zenodoToken, client, tokenDAO, null, null, payload); } } return tokenDAO.findByUserId(user.getId()); }</code><technical_language>want some buffer time in here, a minute. If token is expiring here, expire time is in API. observed some calls 10 seconds UI, I generously rounded 1 minute a suggestion -- much</technical_language>

Target:
private List<Token> checkOnZenodoToken(User user) { List<Token> tokens = tokenDAO.findZenodoByUserId(user.getId()); if (!tokens.isEmpty()) { Token zenodoToken = tokens.get(0); LocalDateTime now = LocalDateTime.now(); LocalDateTime updateTime = zenodoToken.getDbUpdateDate().toLocalDateTime(); if (now.isAfter(updateTime.plusHours(1).minusMinutes(1))) { LOG.info("Refreshing the Zenodo Token"); String refreshUrl = zenodoUrl + "/oauth/token"; String payload = "client_id=" + zenodoClientID + "&client_secret=" + zenodoClientSecret + "&grant_type=refresh_token&refresh_token=" + zenodoToken.getRefreshToken(); refreshToken(refreshUrl, zenodoToken, client, tokenDAO, null, null, payload); } } return tokenDAO.findByUserId(user.getId()); }
Source:
<code>public void findByCandidateFieldRequestShouldFindCandidateCOnlyByPositionFilter() { String name = ""; String email = ""; String phone = ""; <START> String position = "f"; <END> List<CandidateEntity> expectedCandidates = Arrays.asList(candidateC); List<CandidateEntity> actualCandidates = candidateRepository .findByCandidateFilterRequest(name, email, phone, position, DEFAULT_PAGEREQUEST) .getContent(); assertCandidateList(expectedCandidates, actualCandidates); }</code><technical_language>Please refactor "f" string literal a constant. please do other string literals in this test class</technical_language>

Target:
public void findByCandidateFieldRequestShouldFindCandidateCOnlyByPositionFilter() { final String name = StringUtils.EMPTY; final String email = StringUtils.EMPTY; final String phone = StringUtils.EMPTY; final String position = CANDIDATE_C_POSITION_FRAGMENT; final List<CandidateEntity> expectedCandidates = Arrays.asList(candidateC); final List<CandidateEntity> actualCandidates = candidateRepository .findByCandidateFilterRequest(name, email, phone, position, DEFAULT_PAGEREQUEST) .getContent(); assertCandidateList(expectedCandidates, actualCandidates); }
Source:
<code>private void updatePatientIdentifiers(Config config, Patient patient, List<Identifier> fetchedIdentifierList) { String fetchedIdentifierDisplay; String newIdentifierName; <START> for (Identifier fetchedIdentifier : fetchedIdentifierList) { <END> for (Identifier newIdentifier : patient.getIdentifiers()) { fetchedIdentifierDisplay = fetchedIdentifier.getIdentifierType().getDisplay(); newIdentifierName = newIdentifier.getIdentifierType().getName(); if (newIdentifierName.equals(fetchedIdentifierDisplay)) { fetchedIdentifier.setIdentifier(newIdentifier.getIdentifier()); patientResource.updatePatientIdentifier(config, patient.getUuid(), fetchedIdentifier); } } } }</code><technical_language>if want add new patient identifier</technical_language>

Target:
private void updatePatientIdentifiers(Config config, Patient patient, List<Identifier> fetchedIdentifierList) { String fetchedIdentifierName; String newIdentifierName; for (Identifier newIdentifier : patient.getIdentifiers()) { boolean isUpdated = false; for (Identifier fetchedIdentifier : fetchedIdentifierList) { fetchedIdentifierName = fetchedIdentifier.getIdentifierType().getName(); newIdentifierName = newIdentifier.getIdentifierType().getName(); if (newIdentifierName.equals(fetchedIdentifierName)) { fetchedIdentifier.setIdentifier(newIdentifier.getIdentifier()); patientResource.updatePatientIdentifier(config, patient.getUuid(), fetchedIdentifier); isUpdated = true; } } if (!isUpdated) { addNewPatientIdentifier(config, patient, newIdentifier); } } }
Source:
<code>public String getTitle() { <START> return "Export Wizard"; <END> }</code><technical_language>Consider i18n for "Export Wizard"</technical_language>

Target:
public String getTitle() { return i18n.exportWizardTitle(); }
Source:
<code>private Optional<Producer<K, V>> maybeGetKafkaProducer(DatastreamTask task) { <START> Producer<K, V> producer = _kafkaProducer; <END> if (!_tasks.contains(task)) { _log.warn("Task has been unassigned for producer, abort the send", task); return Optional.empty(); } if (producer == null) { try { producer = initializeProducer(task); } catch (InterruptedException e) { _log.warn("Got interrupted while trying to initialize the producer for task {}", task); } } return Optional.ofNullable(producer); }</code><technical_language>extreme nit: move this check</technical_language>

Target:
private Optional<Producer<K, V>> maybeGetKafkaProducer(DatastreamTask task) { if (!_tasks.contains(task)) { _log.warn("Task has been unassigned for producer, abort the send", task); return Optional.empty(); } Producer<K, V> producer = _kafkaProducer; if (producer == null) { try { producer = initializeProducer(task); } catch (InterruptedException e) { _log.warn("Got interrupted while trying to initialize the producer for task {}", task); } } return Optional.ofNullable(producer); }
Source:
<code>public final void execute() throws MojoExecutionException, MojoFailureException { this.loadResources(); if (this.sourceIncludes == null || this.sourceIncludes.size() == 0) { this.sourceIncludes = ScansDirectory.DEFAULT_INCLUDES; } <START> this.getLog().info("Running with the following value for parameter sourceIncludes: "+this.sourceIncludes); <END> this.sources = new ScriptSearch(this.jsSrcDir,this.sourceIncludes,this.sourceExcludes); this.specs = new ScriptSearch(this.jsTestSrcDir,this.specIncludes,this.specExcludes); try { this.run(); } catch(MojoFailureException e) { throw e; } catch(Exception e) { throw new MojoExecutionException("The jasmine-maven-plugin encountered an exception: \n"+this.stringifiesStackTraces.stringify(e),e); } }</code><technical_language>I necessary log this, a debug trace level info</technical_language>

Target:
public void execute() throws MojoExecutionException, MojoFailureException { this.loadResources(); this.initIncludesExcludes(); this.sources = new ScriptSearch(this.jsSrcDir,this.sourceIncludes,this.sourceExcludes); this.specs = new ScriptSearch(this.jsTestSrcDir,this.specIncludes,this.specExcludes); try { this.run(); } catch(MojoFailureException e) { throw e; } catch(Exception e) { throw new MojoExecutionException("The jasmine-maven-plugin encountered an exception: \n"+this.stringifiesStackTraces.stringify(e),e); } }
Source:
<code><START> protected Supplier<BsonValue> getReader(final T t) { <END> final Class<?> documentClass = t.getClass(); final Optional<Method> maybeIdGetter = getIdGetter(documentClass); if (maybeIdGetter.isPresent()) { Method getter = maybeIdGetter.get(); getter.setAccessible(true); return () -> { try { return constructValue(getter.invoke(t)); } catch (Exception e) { e.printStackTrace(); return BsonNull.VALUE; } }; } else { final Optional<Field> maybeField = getIdField(documentClass); if (maybeField.isPresent()) { Field field = maybeField.get(); field.setAccessible(true); return () -> { try { return constructValue(field.get(t)); } catch (Exception e) { e.printStackTrace(); return BsonNull.VALUE; } }; } else { return () -> BsonNull.VALUE; } } }</code><technical_language>this method private others in this file</technical_language>

Target:
private Supplier<BsonValue> getReader(final T t) { final Class<?> documentClass = t.getClass(); final Optional<Method> maybeIdGetter = getIdGetter(documentClass); if (maybeIdGetter.isPresent()) { Method getter = maybeIdGetter.get(); getter.setAccessible(true); return () -> { try { return constructValue(getter.invoke(t)); } catch (Exception e) { e.printStackTrace(); return BsonNull.VALUE; } }; } else { final Optional<Field> maybeField = getIdField(documentClass); if (maybeField.isPresent()) { Field field = maybeField.get(); field.setAccessible(true); return () -> { try { return constructValue(field.get(t)); } catch (Exception e) { e.printStackTrace(); return BsonNull.VALUE; } }; } else { return () -> BsonNull.VALUE; } } }
Source:
<code>protected Merger(final Repository local) { if (local == null) { throw new <START> IllegalArgumentException(JGitText.get().repositoryIsRequired); <END> } db = local; inserter = local.newObjectInserter(); reader = inserter.newReader(); walk = new RevWalk(reader); }</code><technical_language>nit: NullPointerException</technical_language>

Target:
protected Merger(final Repository local) { if (local == null) { throw new NullPointerException(JGitText.get().repositoryIsRequired); } db = local; inserter = local.newObjectInserter(); reader = inserter.newReader(); walk = new RevWalk(reader); }
Source:
<code>public boolean intersectRectangle(Vector3f from, Vector3f direction) { <START> Vector3f dirfrac = new Vector3f( <END> 1.0f / direction.x, 1.0f / direction.y, 1.0f / direction.z ); float t1 = (min.x - from.x) * dirfrac.x; float t2 = (max.x - from.x) * dirfrac.x; float t3 = (min.y - from.y) * dirfrac.y; float t4 = (max.y - from.y) * dirfrac.y; float t5 = (min.z - from.z) * dirfrac.z; float t6 = (max.z - from.z) * dirfrac.z; float tmin = Math.max(Math.max(Math.min(t1, t2), Math.min(t3, t4)), Math.min(t5, t6)); float tmax = Math.min(Math.min(Math.max(t1, t2), Math.max(t3, t4)), Math.max(t5, t6)); if (tmax < 0) { return false; } if (tmin > tmax) { return false; } return true; }</code><technical_language>rename dirfrac dirFrac, we? (i realize introduce this variable in place, hurts sprinkle some code-quality-dust areas visit)</technical_language>

Target:
public boolean intersectRectangle(Vector3f from, Vector3f direction) { Vector3f dirFrac = new Vector3f( 1.0f / direction.x, 1.0f / direction.y, 1.0f / direction.z ); float t1 = (min.x - from.x) * dirFrac.x; float t2 = (max.x - from.x) * dirFrac.x; float t3 = (min.y - from.y) * dirFrac.y; float t4 = (max.y - from.y) * dirFrac.y; float t5 = (min.z - from.z) * dirFrac.z; float t6 = (max.z - from.z) * dirFrac.z; float tmin = Math.max(Math.max(Math.min(t1, t2), Math.min(t3, t4)), Math.min(t5, t6)); float tmax = Math.min(Math.min(Math.max(t1, t2), Math.max(t3, t4)), Math.max(t5, t6)); if (tmax < 0) { return false; } if (tmin > tmax) { return false; } return true; }
Source:
<code>protected boolean onError(Throwable exception) { if (super.onError(exception)) return true; <START> int errorId = exception instanceof YoutubeStreamExtractor.DecryptException ? R.string.youtube_signature_decryption_error : exception instanceof ParsingException ? R.string.parsing_error : R.string.general_error; onUnrecoverableError(exception, UserAction.REQUESTED_STREAM, NewPipe.getNameOfService(serviceId), url, errorId); <END> return true; }</code><technical_language>suggestion int errorId = exception instanceof YoutubeStreamExtractor.DecryptException ? R.string.youtube_signature_decryption_error : exception instanceof ParsingException ? R.string.parsing_error : R.string.general_error; onUnrecoverableError(exception, UserAction.REQUESTED_STREAM, NewPipe.getNameOfService(serviceId), url, errorId);</technical_language>

Target:
protected boolean onError(Throwable exception) { if (super.onError(exception)) return true; int errorId = exception instanceof YoutubeStreamExtractor.DecryptException ? R.string.youtube_signature_decryption_error : exception instanceof ExtractionException ? R.string.parsing_error : R.string.general_error; onUnrecoverableError(exception, UserAction.REQUESTED_STREAM, NewPipe.getNameOfService(serviceId), url, errorId); return true; }
Source:
<code>public StackIcon(String mediaType, byte[] data) throws IOException, ConflictException { <START> if (data.length > 1024 * 1024) { <END> throw new ConflictException("Maximum upload size exceeded."); } this.data = data; if (isSupportedMediaType(mediaType)) { this.mediaType = mediaType; } else { throw new IOException("Image media type '" + mediaType + "' is unsupported."); } }</code><technical_language>extract this static variable visually understand try compare</technical_language>

Target:
public StackIcon(String mediaType, byte[] data) throws IOException, ConflictException { if (data == null || data.length == 0) { throw new IllegalStateException("Image content must not be empty"); } if (data.length > LIMIT_SIZE) { throw new ConflictException("Maximum upload size exceeded 1 Mb limit"); } this.data = data; if (!validMediaTypes.contains(mediaType)) { throw new IOException("Image media type '" + mediaType + "' is unsupported."); } this.mediaType = mediaType; }
Source:
<code>private <T> List<T> createObjectsCollectionFromObject(T object) { List<T> objectCollection; if (object.getClass().isArray()) { T[] objectsAsArray = (T[]) object; objectCollection = Arrays.asList(objectsAsArray); <START> } else if (Iterable.class.isAssignableFrom(object.getClass())) { <END> objectCollection = (List<T>) object; } else { objectCollection = Collections.singletonList(object); } return objectCollection; }</code><technical_language>Iterable is a list, cast is unsafe</technical_language>

Target:
private <T> List<T> createObjectsCollectionFromObject(T object) { List<T> objectCollection; if (object.getClass().isArray()) { T[] objectsAsArray = (T[]) object; objectCollection = Arrays.asList(objectsAsArray); } else if (Iterable.class.isAssignableFrom(object.getClass())) { objectCollection = new ArrayList<>(); ((Iterable<T>)object).forEach(objectCollection::add); } else { objectCollection = Collections.singletonList(object); } return objectCollection; }
Source:
<code>public void testSimplestMessage() throws Exception { RecordConsumer readConsumerMock = Mockito.mock(RecordConsumer.class); ProtoWriteSupport instance = createReadConsumerInstance(TestProtobuf.InnerMessage.class, readConsumerMock); TestProtobuf.InnerMessage.Builder msg = TestProtobuf.InnerMessage.newBuilder(); msg.setOne("oneValue"); instance.write(msg.build()); InOrder inOrder = Mockito.inOrder(readConsumerMock); inOrder.verify(readConsumerMock).startMessage(); inOrder.verify(readConsumerMock).startField("one", 0); <START> inOrder.verify(readConsumerMock).addBinary(Binary.fromConstantByteArray("oneValue".getBytes())); <END> inOrder.verify(readConsumerMock).endField("one", 0); inOrder.verify(readConsumerMock).endMessage(); Mockito.verifyNoMoreInteractions(readConsumerMock); }</code><technical_language>this fromString</technical_language>

Target:
public void testSimplestMessage() throws Exception { RecordConsumer readConsumerMock = Mockito.mock(RecordConsumer.class); ProtoWriteSupport instance = createReadConsumerInstance(TestProtobuf.InnerMessage.class, readConsumerMock); TestProtobuf.InnerMessage.Builder msg = TestProtobuf.InnerMessage.newBuilder(); msg.setOne("oneValue"); instance.write(msg.build()); InOrder inOrder = Mockito.inOrder(readConsumerMock); inOrder.verify(readConsumerMock).startMessage(); inOrder.verify(readConsumerMock).startField("one", 0); inOrder.verify(readConsumerMock).addBinary(Binary.fromString("oneValue")); inOrder.verify(readConsumerMock).endField("one", 0); inOrder.verify(readConsumerMock).endMessage(); Mockito.verifyNoMoreInteractions(readConsumerMock); }
Source:
<code>protected ActionResult execute() { gateKeeper.verifyAdminPrivileges(account); data = new AdminSessionsPageData(account, sessionToken); isShowAll = getRequestParamAsBoolean("all"); ActionResult result = createShowPageResultIfParametersInvalid(); if (result != null) { return result; } Date rangeStartUtc = TimeHelper.convertLocalDateToUtc(this.rangeStart, zone); <START> Date rangeEndUtc = TimeHelper.convertLocalDateToUtc(this.rangeEnd, zone); <END> List<FeedbackSessionAttributes> allOpenFeedbackSessionsList = logic.getAllOpenFeedbackSessions(rangeStartUtc, rangeEndUtc); result = createShowPageResultIfNoOngoingSession(allOpenFeedbackSessionsList); if (result != null) { return result; } result = createAdminSessionPageResult(allOpenFeedbackSessionsList); return result; }</code><technical_language>remove this lines</technical_language>

Target:
protected ActionResult execute() { gateKeeper.verifyAdminPrivileges(account); data = new AdminSessionsPageData(account, sessionToken); isShowAll = getRequestParamAsBoolean("all"); ActionResult result = createShowPageResultIfParametersInvalid(); if (result != null) { return result; } Date rangeStartUtc = TimeHelper.convertLocalDateToUtc(rangeStart, zone); Date rangeEndUtc = TimeHelper.convertLocalDateToUtc(rangeEnd, zone); List<FeedbackSessionAttributes> allOpenFeedbackSessionsList = logic.getAllOpenFeedbackSessions(rangeStartUtc, rangeEndUtc); result = createShowPageResultIfNoOngoingSession(allOpenFeedbackSessionsList); if (result != null) { return result; } result = createAdminSessionPageResult(allOpenFeedbackSessionsList); return result; }
Source:
<code>public MessageFormatMetrics(MetricRegistry registry) { calculateOffsetMessageSendTime = <START> registry.histogram(MetricRegistry.name(MessageFormatSend.class, "CalculateOffsetMessageSendTime")); <END> }</code><technical_language>No. name measure calc offsets + send time. I understand intent of "MessageSend" in metric name though. "CaculateOffsetsTimeMs" clear enough calc offset done in send. Otherwise, "CalculateOffsetsDuringSendTimeMs" is clearer more verbose</technical_language>

Target:
public MessageFormatMetrics(MetricRegistry registry) { calculateOffsetMessageFormatSendTime = registry.histogram(MetricRegistry.name(MessageFormatSend.class, "CalculateOffsetMessageFormatSendTime")); }
Source:
<code>public TupleBatch[] partition(final TupleBatch tb) { BitSet[] partitions = new BitSet[numPartition()]; for (int i = 0; i < tb.numTuples(); i++) { int p = 0; for (int j = 0; j < hashedColumns.length; j++) { p += Math.floorMod( HashUtils.hashSubRow(tb, new int[] {hashedColumns[j]}, i, mappedHCDimensions[j]), hyperCubeDimensions[mappedHCDimensions[j]]); if (p != hashedColumns.length - 1) { p *= hyperCubeDimensions[mappedHCDimensions[j]]; } } <START> partitions[p].set(i); <END> } TupleBatch[] tbs = new TupleBatch[numPartition()]; for (int i = 0; i < tbs.length; ++i) { tbs[i] = tb.filter(partitions[i]); } return tbs; }</code><technical_language>I understand this. I thought HypercubeShuffle supposed send a tuple cells coordinates equal hashes of mapped attributes in tuple, duplicated dimensions mapped attributes in tuple? this logic sends a tuple a single cell, right</technical_language>

Target:
public TupleBatch[] partition(final TupleBatch tb) { BitSet[] partitions = new BitSet[numPartitions()]; for (int i = 0; i < partitions.length; ++i) { partitions[i] = new BitSet(); } for (int i = 0; i < tb.numTuples(); i++) { int p = 0; for (int j = 0; j < hashedColumns.length; j++) { p += Math.floorMod( HashUtils.hashSubRow(tb, new int[] {hashedColumns[j]}, i, mappedHCDimensions[j]), hyperCubeDimensions[mappedHCDimensions[j]]); if (p != hashedColumns.length - 1) { p *= hyperCubeDimensions[mappedHCDimensions[j]]; } } partitions[p].set(i); } TupleBatch[] tbs = new TupleBatch[numPartitions()]; for (int i = 0; i < tbs.length; ++i) { tbs[i] = tb.filter(partitions[i]); } return tbs; }
Source:
<code>private static void testBasicStatisticsRoundTrip(HiveBasicStatistics expected) { <START> assertThat(getHiveBasicStatistics(toStatisticParameters(expected))) <END> .isEqualTo(expected); }</code><technical_language>Nit: I find assertEquals clearer for basic equality assertions this</technical_language>

Target:
private static void testBasicStatisticsRoundTrip(HiveBasicStatistics expected) { assertEquals(getHiveBasicStatistics(updateStatisticParameters(ImmutableMap.of(), expected)), expected); }
Source:
<code>private ChargeStatus determineTerminalState(ChargeEntity chargeEntity, GatewayResponse<BaseCancelResponse> cancelResponse, StatusFlow statusFlow) { if (!cancelResponse.isSuccessful() && !cancelResponse.getBaseResponse().isPresent()) { logUnsuccessfulResponseReasons(chargeEntity, cancelResponse); return statusFlow.getFailureTerminalState(); } switch (cancelResponse.getBaseResponse().get().cancelStatus()) { case CANCELLED: return statusFlow.getSuccessTerminalState(); case SUBMITTED: return statusFlow.getSubmittedState(); } <START> return statusFlow.getFailureTerminalState(); <END> }</code><technical_language>do a similar simplification I suggested here</technical_language>

Target:
private ChargeStatus determineTerminalState(ChargeEntity chargeEntity, GatewayResponse<BaseCancelResponse> cancelResponse, StatusFlow statusFlow) { if (!cancelResponse.isSuccessful()) { logUnsuccessfulResponseReasons(chargeEntity, cancelResponse); } return cancelResponse.getBaseResponse().map(response -> { switch (response.cancelStatus()) { case CANCELLED: return statusFlow.getSuccessTerminalState(); case SUBMITTED: return statusFlow.getSubmittedState(); default: return statusFlow.getFailureTerminalState(); } }).orElse(statusFlow.getFailureTerminalState()); }
Source:
<code>public void intercept(IMethodInvocation invocation) throws Throwable { <START> Object result = evaluateCondition(condition, invocation, invocation.getIteration().getDataVariables()); <END> iterationConditionResult(GroovyRuntimeUtil.isTruthy(result), annotation, invocation); invocation.proceed(); }</code><technical_language>do pass invocation invocation.getInstance() here</technical_language>

Target:
public void intercept(IMethodInvocation invocation) throws Throwable { Object result = evaluateCondition(condition, invocation.getInstance(), invocation.getIteration().getDataVariables()); iterationConditionResult(GroovyRuntimeUtil.isTruthy(result), annotation, invocation); invocation.proceed(); }
Source:
<code>public boolean isDirty() { <START> boolean dirty = super.isDirty(); <END> if (dirty) { return dirty; } return fDirty.get() != 0; }</code><technical_language>I return super.isDirty() || (fDirty.get() != 0); me</technical_language>

Target:
public boolean isDirty() { return super.isDirty() || (fDirty.get() != 0); }
Source:
<code><START> void onAddMe(ClickEvent e) { <END> String reviewer = Gerrit.getUserAccountInfo().name(); if (!reviewer.isEmpty()) { addReviewer(reviewer, false); } }</code><technical_language>typing add user box</technical_language>

Target:
void onAddMe(ClickEvent e) { String accountId = String.valueOf(Gerrit.getUserAccountInfo()._account_id()); addReviewer(accountId, false); }
Source:
<code>private void showQuickStartFocusPoint() { mRecycler.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { RecyclerView.ViewHolder holder = mRecycler.findViewHolderForAdapterPosition(0); if (holder != null) { final View quickStartTarget = holder.itemView; quickStartTarget.post(new Runnable() { @Override public void run() { <START> ViewGroup focusPointContainer = getView().findViewById(R.id.publicize_scroll_view_child); <END> int focusPointSize = getResources().getDimensionPixelOffset(R.dimen.quick_start_focus_point_size); int verticalOffset = (((quickStartTarget.getHeight()) - focusPointSize) / 2); QuickStartUtils.addQuickStartFocusPointAboveTheView(focusPointContainer, quickStartTarget, 0, verticalOffset); } }); mRecycler.getViewTreeObserver().removeOnGlobalLayoutListener(this); } } }); }</code><technical_language>getView() null, getView().findViewById throw a NullPointerException. add a if (getView() != null) check</technical_language>

Target:
private void showQuickStartFocusPoint() { mRecycler.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { RecyclerView.ViewHolder holder = mRecycler.findViewHolderForAdapterPosition(0); if (holder != null) { final View quickStartTarget = holder.itemView; quickStartTarget.post(new Runnable() { @Override public void run() { if (getView() == null) { return; } ViewGroup focusPointContainer = getView().findViewById(R.id.publicize_scroll_view_child); int focusPointSize = getResources().getDimensionPixelOffset(R.dimen.quick_start_focus_point_size); int verticalOffset = (((quickStartTarget.getHeight()) - focusPointSize) / 2); QuickStartUtils.addQuickStartFocusPointAboveTheView(focusPointContainer, quickStartTarget, 0, verticalOffset); } }); mRecycler.getViewTreeObserver().removeOnGlobalLayoutListener(this); } } }); }
Source:
<code>private Map<String, Object> processUserListWithPermissionOnInode(String assetInode, String permission, String query, int start, int limit) { Map<String, Object> results; try { <START> int permissionType = Integer.parseInt(permission); <END> String inode = assetInode; results = new UsersListTemplate(inode, permissionType, query, start, limit) { PermissionAPI perAPI = APILocator.getPermissionAPI(); @Override public int getUserCount() { return perAPI.getUserCount(inode, permissionType, filter); } @Override public List<User> getUsers() { return perAPI.getUsers(inode, permissionType, filter, start, limit); } }.perform(); } catch (NumberFormatException nfe) { Logger.warn(UserServiceImpl.class, String.format( "::getUsersList -> Invalid parameters inode(%s) permission(%s).", assetInode, permission)); results = new HashMap<String, Object>(0); } return results; }</code><technical_language>ConversionUtils :)</technical_language>

Target:
private Map<String, Object> processUserListWithPermissionOnInode(String assetInode, String permission, String query, int start, int limit) { Map<String, Object> results; try { final int permissionType = toInt(permission, 0); results = new UsersListTemplate(assetInode, permissionType, query, start, limit) { @Override public int getUserCount() { return permissionAPI.getUserCount(inode, permissionType, filter); } @Override public List<User> getUsers() { return permissionAPI.getUsers(inode, permissionType, filter, start, limit); } }.perform(); } catch (Exception e) { Logger.warn(UserServiceImpl.class, String.format( "::getUsersList -> Invalid parameters inode(%s) permission(%s).", assetInode, permission)); results = Collections.EMPTY_MAP; } return results; }
Source:
<code>public void finishUp() { int numFolders = 0; int numNonFolders = 0; for (Set<BookmarkRecord> records : recordsWaitingForParent.values()) { for (BookmarkRecord record : records) { if (record.isFolder()) { numFolders += 1; if (!insertFolder(record)) { Logger.warn(LOG_TAG, "Folder with known parent with guid " + record.parentID + " failed to insert!"); <START> return; <END> } Logger.debug(LOG_TAG, "Folder with known parent with guid " + record.parentID + " inserted; adding to inserted folders."); insertedFolders.add(record.guid); continue; } numNonFolders += 1; nonFoldersToWrite.add(record); } } recordsWaitingForParent.clear(); incrementalFlush(); if (!nonFoldersToWrite.isEmpty()) { bulkInsertNonFolders(nonFoldersToWrite); nonFoldersToWrite.clear(); } Logger.debug(LOG_TAG, "finishUp inserted " + numFolders + " folders without known parents " + "and " + numNonFolders + " non-folders without known parents."); if (DEBUG) { dumpState(); } }</code><technical_language>want return here? I continue</technical_language>

Target:
public void finishUp() { int numFolders = 0; int numNonFolders = 0; for (Set<BookmarkRecord> records : recordsWaitingForParent.values()) { for (BookmarkRecord record : records) { if (!record.isFolder()) { numNonFolders += 1; nonFoldersToWrite.add(record); continue; } numFolders += 1; if (!inserter.insertFolder(record)) { Logger.warn(LOG_TAG, "Folder with known parent with guid " + record.parentID + " failed to insert!"); continue; } Logger.debug(LOG_TAG, "Folder with known parent with guid " + record.parentID + " inserted; adding to inserted folders."); insertedFolders.add(record.guid); } } recordsWaitingForParent.clear(); flushNonFolders(); Logger.debug(LOG_TAG, "finishUp inserted " + numFolders + " folders without known parents and " + numNonFolders + " non-folders without known parents."); if (DEBUG) { dumpState(); } }
Source:
<code>public void ensureSize(int rows) { for(int i=0; i < cols.length; ++i) { cols[i].ensureSize(rows, false); <START> } <END> }</code><technical_language>call updateSelected(rows) well? getMaxSize() method, selected array able hold max number of rows</technical_language>

Target:
public void ensureSize(int rows) { for(int i=0; i < cols.length; ++i) { cols[i].ensureSize(rows, false); } updateSelected(rows); }
Source:
<code>public void unparse( SqlWriter writer, SqlCall call, int leftPrec, int rightPrec) { writer.getDialect().unparseRow(writer, call, leftPrec, rightPrec); <START> } <END></code><technical_language>modify unparse logic of SqlRowOperator, instead in SqlDialect, match ROW call unparse specifically</technical_language>

Target:
public void unparse( SqlWriter writer, SqlCall call, int leftPrec, int rightPrec) { SqlUtil.unparseFunctionSyntax(this, writer, call); }
Source:
<code>Map<String, VideoConstraints> computeVideoConstraints() { int maxFrameHeightCopy = maxFrameHeight; final VideoConstraints selectedEndpointConstraints; if (selectedEndpoints.size() > 1) { <START> selectedEndpointConstraints <END> = new VideoConstraints(Math.min(1080, maxFrameHeightCopy)); } else { selectedEndpointConstraints = new VideoConstraints(Math.min(1080, maxFrameHeightCopy), BitrateControllerConfig.Config.onstagePreferredHeightPx(), BitrateControllerConfig.Config.onstagePreferredFramerate()); } Map<String, VideoConstraints> selectedVideoConstraintsMap = selectedEndpoints .stream() .collect(Collectors.toMap(e -> e, e -> selectedEndpointConstraints)); final VideoConstraints pinnedEndpointConstraints = new VideoConstraints(Math.min( BitrateControllerConfig.Config.thumbnailMaxHeightPx(), maxFrameHeightCopy)); Map<String, VideoConstraints> pinnedVideoConstraintsMap = pinnedEndpoints .stream() .collect(Collectors.toMap(e -> e, e -> pinnedEndpointConstraints)); Map<String, VideoConstraints> newVideoConstraints = new HashMap<>(pinnedVideoConstraintsMap); newVideoConstraints.putAll(selectedVideoConstraintsMap); return newVideoConstraints; }</code><technical_language>now, I in future consider a 'receiver quality policy' handle this: basically a policy prefer quality number of participants viewed. Preferring quality list of endpoints pick maximum quality fit for run out of 'room' Preferring number of participants viewed iterate endpoints get in lowest quality, iterate try improve quality for ran out of room. 'Stage view' policy (maximize quality of active speaker), 'tile view' (maximize number of participants seen)</technical_language>

Target:
Map<String, VideoConstraints> computeVideoConstraints() { int maxFrameHeightCopy = maxFrameHeight; final VideoConstraints selectedEndpointConstraints; if (selectedEndpoints.size() > 1) { selectedEndpointConstraints = new VideoConstraints( Math.min(BitrateControllerConfig.Config.onstageIdealHeightPx(), maxFrameHeightCopy)); } else { selectedEndpointConstraints = new VideoConstraints( Math.min(BitrateControllerConfig.Config.onstageIdealHeightPx(), maxFrameHeightCopy), BitrateControllerConfig.Config.onstagePreferredHeightPx(), BitrateControllerConfig.Config.onstagePreferredFramerate()); } Map<String, VideoConstraints> selectedVideoConstraintsMap = selectedEndpoints .stream() .collect(Collectors.toMap(e -> e, e -> selectedEndpointConstraints)); final VideoConstraints pinnedEndpointConstraints = new VideoConstraints(Math.min( BitrateControllerConfig.Config.thumbnailMaxHeightPx(), maxFrameHeightCopy)); Map<String, VideoConstraints> pinnedVideoConstraintsMap = pinnedEndpoints .stream() .collect(Collectors.toMap(e -> e, e -> pinnedEndpointConstraints)); Map<String, VideoConstraints> newVideoConstraints = new HashMap<>(pinnedVideoConstraintsMap); newVideoConstraints.putAll(selectedVideoConstraintsMap); return newVideoConstraints; }
Source:
<code>private <R> R getDeserializedResponse(RestAction<R> action, Response response) throws ActionException { String resultClass = action.getResultClass(); <START> String contentType = response.getHeader(HttpHeaders.CONTENT_TYPE); <END> if (resultClass != null) { Serialization serialization = findSerialization(resultClass, contentType); if (serialization != null) { return deserializeValue(serialization, resultClass, contentType, response.getText()); } } throw new ActionException("Unable to deserialize response. No serializer found."); }</code><technical_language>put this line 98 99</technical_language>

Target:
private <R> R getDeserializedResponse(RestAction<R> action, Response response) throws ActionException { String resultClass = action.getResultClass(); if (resultClass != null) { ContentType contentType = ContentType.valueOf(response.getHeader(HttpHeaders.CONTENT_TYPE)); Serialization serialization = findSerialization(resultClass, contentType); if (serialization != null) { return deserializeValue(serialization, resultClass, contentType, response.getText()); } } throw new ActionException("Unable to deserialize response. No serializer found."); }