auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void checkPermission() throws Exception { TCSubject currentUser = DirectUtils.getTCSubjectFromSession(); if (DirectUtils.isTcStaff(currentUser) || DirectUtils.isTcOperations(currentUser) || DirectUtils.isTCPlatformSpecialist(currentUser)) { return; } List<ContestCopilotDTO> copilots = DataProvider.getCopilotsForDirectProject( getFormData().getProjectId()); for (ContestCopilotDTO copilot : copilots) { if (copilot.getUserId() == currentUser.getUserId()) { return; } } throw new Exception("You don't have permission to access"); }

Target:
private void checkPermission() throws Exception { if (!AuthorizationProvider.isUserGrantedToAccessWorkManager( DirectUtils.getTCSubjectFromSession(), getFormData().getProjectId())) { String errorMessage = "You don't have permission to access the work manager page."; DirectUtils.setErrorMessageInErrorPage(errorMessage); throw new Exception(errorMessage); } }
Source:
public Response end(Action action) { return doAction(VdcActionType.EndExternalStep, new EndExternalStepParameters(guid, action.isSucceeded(), action.isForce()), action); }

Target:
public Response end(Action action) { return doAction(VdcActionType.EndExternalStep, new EndExternalStepParameters(guid, action.isSucceeded()), action); }
Source:
void deleteAllById(@Autowired PersonRepository repository) { PersonWithAllConstructor person3 = new PersonWithAllConstructor(id1, TEST_PERSON1_NAME, TEST_PERSON1_FIRST_NAME, TEST_PERSON_SAMEVALUE,true, 1L, TEST_PERSON1_BORN_ON, "something", Arrays.asList("a", "b"), NEO4J_HQ, Instant.now()); repository.deleteAllById(Arrays.asList(person1.getId(), person3.getId())); assertThat(repository.findAll()).extracting(PersonWithAllConstructor::getId).containsExactly(id2); }

Target:
void deleteAllById(@Autowired PersonRepository repository) { PersonWithAllConstructor person3 = new PersonWithAllConstructor(id1, TEST_PERSON1_NAME, TEST_PERSON1_FIRST_NAME, TEST_PERSON_SAMEVALUE, true, 1L, TEST_PERSON1_BORN_ON, "something", Arrays.asList("a", "b"), NEO4J_HQ, Instant.now()); repository.save(person3); repository.deleteAllById(Arrays.asList(person1.getId(), person3.getId())); assertThat(repository.findAll()).extracting(PersonWithAllConstructor::getId).containsExactly(id2); }
Source:
AbstractStreamingCommitterOperator<CommT, CommT> createStreamingCommitterOperator() { return new StreamingCommitterOperator<>( sink.createCommitter() .orElseThrow(() -> new IllegalArgumentException( "Could not create committer from the sink")), sink.getCommittableSerializer() .orElseThrow(() -> new IllegalArgumentException( "Could not get committable serializer from the sink"))); }

Target:
AbstractStreamingCommitterOperator<CommT, CommT> createStreamingCommitterOperator() { return new StreamingCommitterOperator<>( sink.createCommitter() .orElseThrow(() -> new IllegalStateException( "Could not create committer from the sink")), sink.getCommittableSerializer() .orElseThrow(() -> new IllegalStateException( "Could not get committable serializer from the sink"))); }
Source:
private static boolean onlyRaisesNotImplementedError(AstNode funcDef) { AstNode suite = funcDef.getFirstChild(PythonGrammar.SUITE); List<AstNode> statements = suite.getChildren(PythonGrammar.STATEMENT); if (statements.isEmpty()) { AstNode statementList = suite.getFirstChild(); if (isRaise(statementList)) { AstNode testStatement = statementList.getFirstDescendant(PythonGrammar.TEST); if ("NotImplementedError".equals(testStatement.getToken().getValue())) { return true; } } } else { if (statements.size() <= 2) { if (statements.size() == 2 && !isDocstring(statements.get(0))) { return false; } AstNode statementList = statements.get(statements.size() - 1).getFirstChild(PythonGrammar.STMT_LIST); if (statementList != null && isRaise(statementList)) { AstNode testStatement = statementList.getFirstDescendant(PythonGrammar.TEST); if ("NotImplementedError".equals(testStatement.getToken().getValue())) { return true; } } } } return false; }

Target:
private static boolean onlyRaisesNotImplementedError(AstNode funcDef) { AstNode suite = funcDef.getFirstChild(PythonGrammar.SUITE); List<AstNode> statements = suite.getChildren(PythonGrammar.STATEMENT); if (statements.isEmpty()) { AstNode statementList = suite.getFirstChild(); if (raisesNotImplementedError(statementList)) { return true; } } else { if (statements.size() <= 2) { if (statements.size() == 2 && !isDocstring(statements.get(0))) { return false; } AstNode statementList = statements.get(statements.size() - 1).getFirstChild(PythonGrammar.STMT_LIST); if (statementList != null && raisesNotImplementedError(statementList)) { return true; } } } return false; }
Source:
private IntIterator newRLEIterator(int maxLevel, BytesInput bytes) { try { if (maxLevel == 0) { return new NullIntIterator(); } return new RLEIntIterator( new RunLengthBitPackingHybridDecoder( BytesUtils.getWidthFromMaxInt(maxLevel), new ByteBufferInputStream(bytes.toByteBuffer()))); } catch (IOException e) { throw new ParquetDecodingException("could not read levels in page for col " + path, e); } }

Target:
private IntIterator newRLEIterator(int maxLevel, BytesInput bytes) { try { if (maxLevel == 0) { return new NullIntIterator(); } return new RLEIntIterator( new RunLengthBitPackingHybridDecoder( BytesUtils.getWidthFromMaxInt(maxLevel), bytes.toInputStream())); } catch (IOException e) { throw new ParquetDecodingException("could not read levels in page for col " + path, e); } }
Source:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((type == null) ? 0 : type.hashCode()); result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; }

Target:
public int hashCode() { return Objects.hashCode(type, value); }
Source:
public byte[] toBytes() { ByteBuffer idBuf = ByteBuffer.allocate(sizeInBytes()); idBuf.putShort(version); switch (version) { case BLOB_ID_V1: break; case BLOB_ID_V2: case BLOB_ID_V4: byte flag = (byte) (type.ordinal() & BLOB_ID_TYPE_MASK); flag |= isEncrypted ? IS_ENCRYPTED_MASK : 0; idBuf.put(flag); idBuf.put(datacenterId); idBuf.putShort(accountId); idBuf.putShort(containerId); break; case BLOB_ID_V3: flag = (byte) (type.ordinal() & BLOB_ID_TYPE_MASK); idBuf.put(flag); idBuf.put(datacenterId); idBuf.putShort(accountId); idBuf.putShort(containerId); break; default: throw new IllegalArgumentException("blobId version=" + version + " not supported"); } idBuf.put(partitionId.getBytes()); idBuf.putInt(uuid.getBytes().length); idBuf.put(uuid.getBytes()); return idBuf.array(); }

Target:
public byte[] toBytes() { ByteBuffer idBuf = ByteBuffer.allocate(sizeInBytes()); idBuf.putShort(version); byte flag; switch (version) { case BLOB_ID_V1: break; case BLOB_ID_V2: case BLOB_ID_V3: flag = (byte) (type.ordinal() & BLOB_ID_TYPE_MASK); idBuf.put(flag); idBuf.put(datacenterId); idBuf.putShort(accountId); idBuf.putShort(containerId); break; case BLOB_ID_V4: flag = (byte) (type.ordinal() & BLOB_ID_TYPE_MASK); flag |= isEncrypted ? IS_ENCRYPTED_MASK : 0; idBuf.put(flag); idBuf.put(datacenterId); idBuf.putShort(accountId); idBuf.putShort(containerId); break; default: throw new IllegalArgumentException("blobId version=" + version + " not supported"); } idBuf.put(partitionId.getBytes()); idBuf.putInt(uuid.getBytes().length); idBuf.put(uuid.getBytes()); return idBuf.array(); }
Source:
private boolean isHealthcheckOverdue(SingularityTask task) { final long healthcheckDuration = taskManager.getLastHealthcheck(task.getTaskId()).get().getDurationMillis().or(0L); final boolean isOverdue = healthcheckDuration > getKillAfterHealthcheckRunningForMillis(); if (isOverdue) { LOG.debug("Task healthcheck is overdue (duration: {}), allowed limit {}", task.getTaskId(), JavaUtils.durationFromMillis(healthcheckDuration), JavaUtils.durationFromMillis(getKillAfterHealthcheckRunningForMillis())); } return isOverdue; }

Target:
private boolean isHealthcheckOverdue(SingularityTask task) { final long healthcheckDuration = System.currentTimeMillis() - getTaskRunningStartTime(task.getTaskId()); final boolean isOverdue = healthcheckDuration > getKillAfterHealthcheckRunningForMillis(); if (isOverdue) { LOG.debug("Task healthcheck is overdue (duration: {}), allowed limit {}", task.getTaskId(), JavaUtils.durationFromMillis(healthcheckDuration), JavaUtils.durationFromMillis(getKillAfterHealthcheckRunningForMillis())); } return isOverdue; }
Source:
public void testChangeMetaReplicaCount() throws Exception { Admin admin = TEST_UTIL.getAdmin(); try (RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(TableName.META_TABLE_NAME)) { assertEquals(1, locator.getAllRegionLocations().size()); HBaseTestingUtility.setReplicas(admin, TableName.META_TABLE_NAME, 3); TEST_UTIL.waitFor(30000, () -> locator.getAllRegionLocations().size() == 3); HBaseTestingUtility.setReplicas(admin, TableName.META_TABLE_NAME, 2); TEST_UTIL.waitFor(30000, () -> locator.getAllRegionLocations().size() == 2); } }

Target:
public void testChangeMetaReplicaCount() throws Exception { Admin admin = TEST_UTIL.getAdmin(); try (RegionLocator locator = TEST_UTIL.getConnection().getRegionLocator(TableName.META_TABLE_NAME)) { assertEquals(1, locator.getAllRegionLocations().size()); HBaseTestingUtility.setReplicas(admin, TableName.META_TABLE_NAME, 3); TEST_UTIL.waitFor(30000, () -> locator.getAllRegionLocations().size() == 3); HBaseTestingUtility.setReplicas(admin, TableName.META_TABLE_NAME, 2); TEST_UTIL.waitFor(30000, () -> locator.getAllRegionLocations().size() == 2); HBaseTestingUtility.setReplicas(admin, TableName.META_TABLE_NAME, 1); TEST_UTIL.waitFor(30000, () -> locator.getAllRegionLocations().size() == 1); } }
Source:
public CategoryPill.Data execute(final CreateCategoryContext context) { JSONObject jsonObject = new JSONObject(ImmutableMap.builder() .put("name", context.getCategoryName()) .put("parentId", PARENT_ID) .put("siteId", context.getSiteId()) .build()); String response = null; try { response = remoteOperation.execute(buildUrl(context), jsonObject); } catch(RemoteException e) { PageObjectLogging.logError("error: ", e); } DocumentContext json = JsonPath.parse(response); CategoryPill.Data data = new CategoryPill.Data(json.read("$.id"), json.read("$.name")); data.setDisplayOrder(json.read("$.displayOrder")); return data; }

Target:
public CategoryPill.Data execute(final CreateCategoryContext context) { JSONObject jsonObject = new JSONObject(ImmutableMap.builder() .put("name", context.getCategoryName()) .put("parentId", PARENT_ID) .put("siteId", context.getSiteId()) .build()); String response; try { response = remoteOperation.execute(buildUrl(context), jsonObject); } catch(RemoteException e) { PageObjectLogging.logError("error: ", e); throw new CategoryNotCreated("Could not create a new category.", e); } DocumentContext json = JsonPath.parse(response); CategoryPill.Data data = new CategoryPill.Data(json.read("$.id"), json.read("$.name")); data.setDisplayOrder(json.read("$.displayOrder")); return data; }
Source:
public static void deliverReport(String releaseStage, String payload) { if (releaseStage == null || releaseStage.length() == 0 || getClient().getConfig().shouldNotifyForReleaseStage(releaseStage)) { getClient().getErrorStore().enqueueContentForDelivery(payload); getClient().getErrorStore().flushAsync(); } }

Target:
public static void deliverReport(String releaseStage, String payload) { Client client = getClient(); if (releaseStage == null || releaseStage.length() == 0 || client.getConfig().shouldNotifyForReleaseStage(releaseStage)) { client.getErrorStore().enqueueContentForDelivery(payload); client.getErrorStore().flushAsync(); } }
Source:
public static List<SleepPeriod> getSleepPeriodQueue(final DateTime targetDate, final DateTime currentTimeLocal){ final List<SleepPeriod> sleepPeriods = new ArrayList<>(); if (currentTimeLocal.isAfter(targetDate.plusDays(1).withTimeAtStartOfDay().plusHours(3).getMillis())){ return createAllSleepPeriods(targetDate); } if (currentTimeLocal.isAfter(targetDate.withTimeAtStartOfDay().plusHours(19).getMillis())){ sleepPeriods.add(SleepPeriod.morning(targetDate)); sleepPeriods.add(SleepPeriod.afternoon(targetDate)); return sleepPeriods; } if (currentTimeLocal.isAfter(targetDate.withTimeAtStartOfDay().plusHours(7).getMillis())){ sleepPeriods.add(SleepPeriod.morning(targetDate)); return sleepPeriods; } return sleepPeriods; }

Target:
public static List<SleepPeriod> getSleepPeriodQueue(final DateTime targetDate, final DateTime currentTimeLocal){ final List<SleepPeriod> sleepPeriods = new ArrayList<>(); if (currentTimeLocal.isAfter(targetDate.withTimeAtStartOfDay().plusHours(FULLDAY_ROLLOVER).getMillis())){ return createAllSleepPeriods(targetDate); } if (currentTimeLocal.isAfter(targetDate.withTimeAtStartOfDay().plusHours(AFTERNOON_ROLLOVER).getMillis())){ sleepPeriods.add(SleepPeriod.morning(targetDate)); sleepPeriods.add(SleepPeriod.afternoon(targetDate)); return sleepPeriods; } if (currentTimeLocal.isAfter(targetDate.withTimeAtStartOfDay().plusHours(MORNING_ROLLOVER).getMillis())){ sleepPeriods.add(SleepPeriod.morning(targetDate)); return sleepPeriods; } return sleepPeriods; }
Source:
public AuthorizationRest findByObjectAndFeature(@Parameter(value = "uri", required = true) String uri, @Parameter(value = "eperson") UUID epersonUuid, @Parameter(value = "feature", required = true) String featureName, Pageable pageable) throws AuthorizeException, SQLException { Context context = obtainContext(); BaseObjectRest obj = utils.getBaseObjectRestFromUri(context, uri); if (obj == null) { return null; } EPerson currUser = context.getCurrentUser(); EPerson user = getUserFromRequestParameter(context, epersonUuid); context.setCurrentUser(user); AuthorizationFeature feature = authorizationFeatureService.find(featureName); AuthorizationRest authorizationRest = null; if (authorizationFeatureService.isAuthorized(context, feature, obj)) { Authorization authz = new Authorization(); authz.setEperson(user); authz.setFeature(feature); authz.setObject(obj); authorizationRest = converter.toRest(authz, utils.obtainProjection()); } context.setCurrentUser(currUser); return authorizationRest; }

Target:
public AuthorizationRest findByObjectAndFeature(@Parameter(value = "uri", required = true) String uri, @Parameter(value = "eperson") UUID epersonUuid, @Parameter(value = "feature", required = true) String featureName, Pageable pageable) throws AuthorizeException, SQLException { Context context = obtainContext(); BaseObjectRest obj = utils.getBaseObjectRestFromUri(context, uri); if (obj == null) { return null; } EPerson currUser = context.getCurrentUser(); EPerson user = getUserFromRequestParameter(context, epersonUuid); if (currUser != user) { context.switchContextUser(user); } AuthorizationFeature feature = authorizationFeatureService.find(featureName); AuthorizationRest authorizationRest = null; if (authorizationFeatureService.isAuthorized(context, feature, obj)) { Authorization authz = new Authorization(); authz.setEperson(user); authz.setFeature(feature); authz.setObject(obj); authorizationRest = converter.toRest(authz, utils.obtainProjection()); } if (currUser != user) { context.restoreContextUser(); } return authorizationRest; }
Source:
public static Polygon unifyWindingOrderForPolyGon(Polygon poly, boolean counterClockWise) { LinearRing shell = unifyWindingOrderForLinearRing((LinearRing) poly.getExteriorRing(), counterClockWise); LinearRing holes[] = new LinearRing[poly.getNumInteriorRing()]; for (int i = 0; i < poly.getNumInteriorRing(); i++) { holes[i] = unifyWindingOrderForLinearRing((LinearRing) poly.getInteriorRingN(i), !counterClockWise); } Polygon tempPoly = factory.createPolygon(shell, poly.getNumInteriorRing() > 0 ? holes : null); return tempPoly; }

Target:
public static Polygon unifyWindingOrderForPolyGon(Polygon poly, boolean counterClockWise) { LinearRing shell = unifyWindingOrderForLinearRing((LinearRing) poly.getExteriorRing(), counterClockWise); Polygon revPoly; if (poly.getNumInteriorRing() > 0) { LinearRing holes[] = new LinearRing[poly.getNumInteriorRing()]; for (int i = 0; i < poly.getNumInteriorRing(); i++) { holes[i] = unifyWindingOrderForLinearRing((LinearRing) poly.getInteriorRingN(i), !counterClockWise); } revPoly = factory.createPolygon(shell, holes); } else revPoly = factory.createPolygon(shell); return revPoly; }
Source:
public static boolean fixAppDataPermissions(Context context) { if (!Shell.SU.available()) { Log.e(TAG, "Root is not available. Cannot fix permissions."); return false; } String packageName; ApplicationInfo appInfo; try { packageName = context.getPackageName(); appInfo = context.getPackageManager().getApplicationInfo(packageName, 0); } catch (NameNotFoundException e) { Log.w(TAG, "Error getting current package name", e); return false; } Log.d(TAG, "Uid of '" + packageName + "' is " + appInfo.uid); String dir = context.getFilesDir().getAbsolutePath(); String cmd = "chown -R " + appInfo.uid + ":" + appInfo.uid + " " + dir + "; "; cmd += "restorecon -R " + dir + "\n"; Log.d(TAG, "Running: '" + cmd); int exitCode = runShellCommand(cmd, true); if (exitCode == 0) { Log.i(TAG, "Fixed app data permissions on '" + dir + "'."); } else { Log.w(TAG, "Failed to fix app data permissions on '" + dir + "'. Result: " + Integer.toString(exitCode)); } return (exitCode == 0); }

Target:
public static boolean fixAppDataPermissions(Context context) { if (!Shell.SU.available()) { Log.e(TAG, "Root is not available. Cannot fix permissions."); return false; } String packageName; ApplicationInfo appInfo; try { packageName = context.getPackageName(); appInfo = context.getPackageManager().getApplicationInfo(packageName, 0); } catch (NameNotFoundException e) { Log.w(TAG, "Error getting current package name", e); return false; } Log.d(TAG, "Uid of '" + packageName + "' is " + appInfo.uid); String dir = context.getFilesDir().getAbsolutePath(); String cmd = "chown -R " + appInfo.uid + ":" + appInfo.uid + " " + dir + "; "; cmd += "restorecon -R " + dir + "\n"; Log.d(TAG, "Running: '" + cmd); int exitCode = runShellCommand(cmd, true); if (exitCode == 0) { Log.i(TAG, "Fixed app data permissions on '" + dir + "'."); } else { Log.w(TAG, "Failed to fix app data permissions on '" + dir + "'. Result: " + Integer.toString(exitCode)); } return exitCode == 0; }
Source:
public DataTransactionResult remove(DataHolder dataHolder) { return DataTransactionBuilder.builder().result(DataTransactionResult.Type.FAILURE).build(); }

Target:
public DataTransactionResult remove(DataHolder dataHolder) { if (supports(dataHolder)) { net.minecraft.entity.Entity entity = ((net.minecraft.entity.Entity) dataHolder); if (entity.isRiding()) { entity.mountEntity(null); return DataTransactionBuilder.builder().result(DataTransactionResult.Type.SUCCESS).build(); } else { return DataTransactionBuilder.builder().result(DataTransactionResult.Type.FAILURE).build(); } } else { return DataTransactionBuilder.builder().result(DataTransactionResult.Type.FAILURE).build(); } }
Source:
public void clean(Path path) { String[] command = {"make", "clean"}; if (run(command, path).isPresent()) { log.info("Cleaned project"); } else { log.warn("Cleaning project was not successful"); } }

Target:
public void clean(Path path) { String[] command = {"make", "clean"}; try { ProcessResult result = run(command, path); if (result.statusCode != 0) { log.error("Cleaning project was not successful", result.errorOutput); } log.info("Cleaned project"); } catch (Exception e) { log.error("Cleaning project was not successful", e); } }
Source:
public static List<CallExpression> extractSupportedSpatialComparisons(RowExpression filterExpression, FunctionManager functionManager) { return LogicalRowExpressions.extractConjuncts(filterExpression).stream() .filter(CallExpression.class::isInstance) .map(CallExpression.class::cast) .filter(call -> functionManager.getFunctionMetadata(call.getFunctionHandle()).getOperatorType().map(OperatorType::isComparisonOperator).orElse(false)) .filter(call -> isSupportedSpatialComparison(call, functionManager)) .collect(toImmutableList()); }

Target:
public static List<CallExpression> extractSupportedSpatialComparisons(RowExpression filterExpression, FunctionManager functionManager) { return LogicalRowExpressions.extractConjuncts(filterExpression).stream() .filter(CallExpression.class::isInstance) .map(CallExpression.class::cast) .filter(call -> new FunctionResolution(functionManager).isComparisonFunction(call.getFunctionHandle())) .filter(call -> isSupportedSpatialComparison(call, functionManager)) .collect(toImmutableList()); }
Source:
public void testNegateAllExceptJavaInSrc() throws IOException { writeIgnoreFile(".gitignore", "/*", "!/src/"); writeTrashFile("nothere.o", ""); writeIgnoreFile("src/.gitignore", "*", "!*.java"); writeTrashFile("src/keep.java", ""); writeTrashFile("src/nothere.o", ""); writeTrashFile("src/a/nothere.o", ""); beginWalk(); assertEntry(F, ignored, ".gitignore"); assertEntry(F, ignored, "nothere.o"); assertEntry(D, false, "src"); assertEntry(F, ignored, "src/.gitignore"); assertEntry(D, ignored, "src/a"); assertEntry(F, ignored, "src/a/nothere.o"); assertEntry(F, tracked, "src/keep.java"); }

Target:
public void testNegateAllExceptJavaInSrc() throws IOException { writeIgnoreFile(".gitignore", "/*", "!/src/"); writeTrashFile("nothere.o", ""); writeIgnoreFile("src/.gitignore", "*", "!*.java"); writeTrashFile("src/keep.java", ""); writeTrashFile("src/nothere.o", ""); writeTrashFile("src/a/nothere.o", ""); beginWalk(); assertEntry(F, ignored, ".gitignore"); assertEntry(F, ignored, "nothere.o"); assertEntry(D, tracked, "src"); assertEntry(F, ignored, "src/.gitignore"); assertEntry(D, ignored, "src/a"); assertEntry(F, ignored, "src/a/nothere.o"); assertEntry(F, tracked, "src/keep.java"); assertEntry(F, ignored, "src/nothere.o"); endWalk(); }
Source:
public int compareTo(InformationLoss<?> other) { if (!other.getClass().equals(this.getClass())) { throw new IllegalArgumentException("Incompatible class (" + other.getClass().getSimpleName() + ")"); } BigFraction otherValue = ((ILScore)other).getValue(); return value.compareTo(otherValue) * -1; }

Target:
public int compareTo(InformationLoss<?> other) { BigFraction otherValue = ((ILScore)other).getValue(); return value.compareTo(otherValue) * -1; }
Source:
private String completeErrorMessage(String errorMessage) { String completeErrorMessage = "\n" + "\nThe following OpenGL versions/extensions are required but are not supported by your GPU driver:\n" + "\n" + errorMessage + "\n" + "GPU Information:\n" + "\n"; if (GLContext.getCapabilities().OpenGL11) { completeErrorMessage = completeErrorMessage + " Vendor: " + GL11.glGetString(GL11.GL_VENDOR) + "\n" + " Model: " + GL11.glGetString(GL11.GL_RENDERER) + "\n" + " Drivers: " + GL11.glGetString(GL11.GL_VERSION) + "\n"; } else { String adapterName = Display.getAdapter(); if (adapterName == null) { adapterName = "unknown"; } String driverVersion = Display.getVersion(); if (driverVersion == null) { driverVersion = "unknown"; } completeErrorMessage = completeErrorMessage + " GPU in use: " + adapterName + "\n" + " GPU Driver Version: " + driverVersion + "\n"; } completeErrorMessage += "\n"; completeErrorMessage += "Try updating the drivers to the latest version available.\n" + "If that fails you might need a different GPU. Sorry!\n"; return completeErrorMessage; }

Target:
private String completeErrorMessage(String errorMessage) { String completeErrorMessage = "\n" + "\nThe following OpenGL versions/extensions are required but are not supported by your GPU driver:\n" + "\n" + errorMessage + "\n" + "GPU Information:\n" + "\n" + " Vendor: " + GL11.glGetString(GL11.GL_VENDOR) + "\n" + " Model: " + GL11.glGetString(GL11.GL_RENDERER) + "\n" + " Driver: " + GL11.glGetString(GL11.GL_VERSION) + "\n" + "\n" + "Try updating the driver to the latest version available.\n" + "If that fails you might need a different GPU. Sorry!\n"; return completeErrorMessage; }
Source:
private void handleNoSuccess(final DataObjectAttrExecutor dataObjectAttrExecutor) throws DataObjectAttrExecutionCancellationException { this.errString += dataObjectAttrExecutor.createRequestAndResultCodeInfo(); this.containsError = true; if (this.stopOnNoSuccess) { throw new DataObjectAttrExecutionCancellationException(dataObjectAttrExecutor.getName() + " was unsuccesfull. Stopping execution after element: " + this.dataObjectAttrExecutorList.indexOf(dataObjectAttrExecutor) + " (total elements: " + this.dataObjectAttrExecutorList.size() + ")"); } }

Target:
private void handleNoSuccess(final DataObjectAttrExecutor dataObjectAttrExecutor) throws ProtocolAdapterException { this.errString += dataObjectAttrExecutor.createRequestAndResultCodeInfo(); this.containsError = true; if (this.stopOnNoSuccess) { LOGGER.error(this.executor + REQUESTS_FAILED_FOR, this.errString); throw new ProtocolAdapterException(this.errString + ". Stopping execution after element: " + this.dataObjectAttrExecutorList.indexOf(dataObjectAttrExecutor) + " (total elements: " + this.dataObjectAttrExecutorList.size() + ")"); } }
Source:
public void visitMethod(MethodTree tree) { if (tree == writeObjectMethodTree || moreThanSingleLock) { return; } if (hasModifier(tree.modifiers(), SYNCHRONIZED)) { moreThanSingleLock = true; } super.visitMethod(tree); }

Target:
public void visitMethod(MethodTree tree) { if (tree == writeObjectMethodTree || moreThanSingleLock) { return; } if (hasModifier(tree.modifiers(), SYNCHRONIZED)) { moreThanSingleLock = true; return; } super.visitMethod(tree); }
Source:
public PdfActionUrlObject(FormLayout formLayout, String crfOid, String instance, String ecid, String redirect, boolean markComplete, String studyOid, List<FormLayoutMedia> mediaList, String goTo, String flavor, Role role, Study parentStudy, Study site, StudyEvent studyEvent, String mode, EventDefinitionCrf edc, EventCrf eventCrf, String loadWarning, boolean formLocked, String studySubjectOID, String format, String margin, String landscape) { super(formLayout, crfOid, instance, ecid, redirect, markComplete, studyOid, mediaList, goTo, flavor, role, parentStudy, site, studyEvent, mode, edc, eventCrf, loadWarning, formLocked, null); this.studySubjectOID = studySubjectOID; this.format = format; this.margin = margin; this.landscape = landscape; }

Target:
public PdfActionUrlObject(FormLayout formLayout, String crfOid, String instance, String ecid, String redirect, boolean markComplete, String studyOid, List<FormLayoutMedia> mediaList, String goTo, String flavor, Role role, Study parentStudy, Study site, StudyEvent studyEvent, String mode, EventDefinitionCrf edc, EventCrf eventCrf, String loadWarning, boolean formLocked, String studySubjectOID, String format, String margin, String landscape) { super(formLayout, crfOid, instance, ecid, redirect, markComplete, studyOid, mediaList, goTo, flavor, role, parentStudy, site, studyEvent, mode, edc, eventCrf, loadWarning, formLocked); this.studySubjectOID = studySubjectOID; this.format = format; this.margin = margin; this.landscape = landscape; }
Source:
void ensureSize(long position) { assertNonNegativePosition(position); while (position >= this.size) { addBit(false); } }

Target:
void ensureSize(long position) { assertNonNegativePosition(position); if (position >= this.size) { this.validHashCode = false; long newSize = position + 1; int arrayOfBitsLength = this.arrayOfBits.length; int sizeInWords = getSizeInWords(newSize); while (sizeInWords > arrayOfBitsLength) { arrayOfBitsLength = GROWTH_FACTOR * arrayOfBitsLength; } resizeArray(arrayOfBitsLength); this.size = newSize; } }
Source:
public Set<Genome> getCurrentGenomeSet() { return currentGenomeList; }

Target:
public Set<Genome> getCurrentGenomeSet() { return currentGenomeSet; }
Source:
public AnnotationVisitor visitAnnotation(String desc, boolean visible) { Type type = getType(desc); for (Type annotationType : annotationTypes) { if (annotationType.equals(type)) { try { annotatedFields.add(selfClass().getDeclaredField(name)); break; } catch (NoSuchFieldException e) { throw new IllegalStateException("Error visiting field " + name, e); } catch (NoClassDefFoundError e) { log.info("Unable to scan field '{}' of class '{}'", name, selfClass().getName(), e.getMessage()); } } } return super.visitAnnotation(desc, visible); }

Target:
public AnnotationVisitor visitAnnotation(String desc, boolean visible) { Type type = getType(desc); for (Type annotationType : annotationTypes) { if (annotationType.equals(type)) { try { annotatedFields.add(selfClass().getDeclaredField(name)); break; } catch (NoSuchFieldException e) { throw new IllegalStateException("Error visiting field " + name + " of class " + selfClass().getName(), e); } catch (NoClassDefFoundError e) { log.info("Unable to scan field '{}' of class '{}'", name, selfClass().getName(), e.getMessage()); } } } return super.visitAnnotation(desc, visible); }
Source:
public Raven createRavenInstance(Dsn dsn) { Raven raven = new Raven(); raven.setConnection(createConnection(dsn)); try { Class.forName("javax.servlet.ServletRequestListener", false, this.getClass().getClassLoader()); raven.addBuilderHelper(new HttpEventBuilderHelper()); raven.addBuilderHelper(new ContextBuilderHelper(raven)); } catch (ClassNotFoundException e) { logger.debug("The current environment doesn't provide access to servlets," + "or provides an unsupported version."); } return raven; }

Target:
public Raven createRavenInstance(Dsn dsn) { Raven raven = new Raven(); raven.setConnection(createConnection(dsn)); try { Class.forName("javax.servlet.ServletRequestListener", false, this.getClass().getClassLoader()); raven.addBuilderHelper(new HttpEventBuilderHelper()); } catch (ClassNotFoundException e) { logger.debug("The current environment doesn't provide access to servlets," + "or provides an unsupported version."); } raven.addBuilderHelper(new ContextBuilderHelper(raven)); return raven; }
Source:
public static void checkArgument(boolean expression, String errorMessage, String... args) { if (!expression) { if (args != null && args.length > 0) { String message = String.format("errorMessage", args); throw new IllegalArgumentException(message); } else { throw new IllegalArgumentException(errorMessage); } } }

Target:
public static void checkArgument(boolean expression, String errorMessage, String... args) { if (!expression) { if (args != null && args.length > 0) { String message = String.format(errorMessage, args); throw new IllegalArgumentException(message); } else { throw new IllegalArgumentException(errorMessage); } } }
Source:
private void fetch(Repository repo, URIish u) throws URISyntaxException, JGitInternalException, InvalidRemoteException, IOException { RemoteConfig config = new RemoteConfig(repo.getConfig(), origin); config.addURI(u); final String dst = Constants.R_REMOTES + config.getName(); RefSpec refSpec = new RefSpec(); refSpec = refSpec.setForceUpdate(true); refSpec = refSpec.setSourceDestination(Constants.R_HEADS + "*", dst + "/*"); config.addFetchRefSpec(refSpec); config.update(repo.getConfig()); repo.getConfig().save(); FetchCommand command = new FetchCommand(repo); command.setRemote(origin); command.setRefSpecs(refSpec); command.setProgressMonitor(monitor); command.call(); }

Target:
private FetchResult fetch(Repository repo, URIish u) throws URISyntaxException, JGitInternalException, InvalidRemoteException, IOException { RemoteConfig config = new RemoteConfig(repo.getConfig(), origin); config.addURI(u); final String dst = Constants.R_REMOTES + config.getName(); RefSpec refSpec = new RefSpec(); refSpec = refSpec.setForceUpdate(true); refSpec = refSpec.setSourceDestination(Constants.R_HEADS + "*", dst + "/*"); config.addFetchRefSpec(refSpec); config.update(repo.getConfig()); repo.getConfig().save(); FetchCommand command = new FetchCommand(repo); command.setRemote(origin); command.setProgressMonitor(monitor); if (credentialsProvider != null) command.setCredentialsProvider(credentialsProvider); return command.call(); }
Source:
public static String toSnapshotVersion( String version ) { Validate.notBlank( version, "version can neither be null, empty nor blank" ); int lastDash = version.lastIndexOf( '-' ); if ( lastDash > 0 ) { int prevDash = version.lastIndexOf( '-', lastDash - 1 ); if ( prevDash > 0 ) { Matcher m = Artifact.VERSION_FILE_PATTERN.matcher( version ); if ( m.matches() ) { return m.group( 1 ) + "-" + Artifact.SNAPSHOT_VERSION; } } } return version; }

Target:
public static String toSnapshotVersion( String version ) { notBlank( version, "version can neither be null, empty nor blank" ); int lastHyphen = version.lastIndexOf( '-' ); if ( lastHyphen > 0 ) { int prevHyphen = version.lastIndexOf( '-', lastHyphen - 1 ); if ( prevHyphen > 0 ) { Matcher m = Artifact.VERSION_FILE_PATTERN.matcher( version ); if ( m.matches() ) { return m.group( 1 ) + "-" + Artifact.SNAPSHOT_VERSION; } } } return version; }
Source:
protected void validateApplication(ArtifactCoordinates domain, ArtifactCoordinates applicationCoordinates) throws ValidationException { Set<ArtifactCoordinates> applicationDomains = getApplicationDomains(applicationCoordinates); if (applicationDomains.size() != DOMAIN_BUNDLE_VALID_NUMBER_OF_DOMAINS || !applicationDomains.contains(domain)) { throw new ValidationException("Every application in the domain bundle must refer to the specified domain: " + domain + ". However, the application refers to the following domain(s): " + applicationDomains.stream().collect(Collectors.toList())); } }

Target:
protected void validateApplication(ArtifactCoordinates domain, ArtifactCoordinates applicationCoordinates) throws ValidationException { Set<ArtifactCoordinates> applicationDomains = getApplicationDomains(applicationCoordinates); if (applicationDomains.size() != DOMAIN_BUNDLE_VALID_NUMBER_OF_DOMAINS || !applicationDomains.contains(domain)) { String message = "Every application in the domain bundle must refer to the specified domain: " + domain + ". "; if (applicationDomains.isEmpty()) { message += "However, the application has reference to no domain"; } else { message += "However, the application refers to the following domain(s): " + applicationDomains.stream().collect(Collectors.toList()); } throw new ValidationException(message); } }
Source:
public String getPostId() { return new String(); }

Target:
public String getPostId() { return ""; }
Source:
private void validateAttributeDefs(Collection<ConfigAttribute> attributeDefs) { Set<ConfigAttribute> unsupportedAttrs = new HashSet<>(); for (ConfigAttribute attr : attributeDefs) { if (!this.runAsManager.supports(attr) && this.accessDecisionManager != null && !this.accessDecisionManager.supports(attr) && ((this.afterInvocationManager == null) || !this.afterInvocationManager.supports(attr))) { unsupportedAttrs.add(attr); } } if (unsupportedAttrs.size() != 0) { this.logger .trace("Did not validate configuration attributes since validateConfigurationAttributes is false"); throw new IllegalArgumentException("Unsupported configuration attributes: " + unsupportedAttrs); } else { this.logger.trace("Validated configuration attributes"); } }

Target:
private void validateAttributeDefs(Collection<ConfigAttribute> attributeDefs) { Set<ConfigAttribute> unsupportedAttrs = new HashSet<>(); for (ConfigAttribute attr : attributeDefs) { if (!this.runAsManager.supports(attr) && !this.accessDecisionManager.supports(attr) && ((this.afterInvocationManager == null) || !this.afterInvocationManager.supports(attr))) { unsupportedAttrs.add(attr); } } if (unsupportedAttrs.size() != 0) { this.logger .trace("Did not validate configuration attributes since validateConfigurationAttributes is false"); throw new IllegalArgumentException("Unsupported configuration attributes: " + unsupportedAttrs); } else { this.logger.trace("Validated configuration attributes"); } }
Source:
public boolean exists() { try { getWrappedElement().isDisplayed(); return true; } catch (NoSuchElementException ignored) { return false; } }

Target:
public boolean exists() { try { getWrappedElement().isDisplayed(); } catch (NoSuchElementException ignored) { return false; } return true; }
Source:
protected NonEmptyImmutableList(@Nonnull T head, @Nonnull final ImmutableList<T> tail) { super(tail.length + 1); this.head = head; this.tail = tail; this.hashCode = HashCodeBuilder.put(tail.hashCode(), head); }

Target:
protected NonEmptyImmutableList(@Nonnull T head, @Nonnull final ImmutableList<T> tail) { super(tail.length + 1); this.head = head; this.tail = tail; }
Source:
public IncompleteFormListAdapter(Context context, AndroidCommCarePlatform platform, FormRecordLoaderTask loader) { this.context = context; this.filter = null; this.loader = loader; observers = new ArrayList<>(); names = new Hashtable<>(); loader.addListener(this); for (Suite s : platform.getInstalledSuites()) { for (Enumeration en = s.getEntries().elements(); en.hasMoreElements(); ) { Entry entry = (Entry) en.nextElement(); if (entry instanceof FormEntry) { String namespace = ((FormEntry)entry).getXFormNamespace(); if(namespace != null) { names.put(namespace, entry.getText()); } } } } }

Target:
public IncompleteFormListAdapter(Context context, AndroidCommCarePlatform platform, FormRecordLoaderTask loader) { this.context = context; this.filter = null; this.loader = loader; observers = new ArrayList<>(); names = new Hashtable<>(); loader.addListener(this); for (Suite s : platform.getInstalledSuites()) { for (Enumeration en = s.getEntries().elements(); en.hasMoreElements(); ) { Entry entry = (Entry) en.nextElement(); if (!entry.isView()) { String namespace = ((FormEntry)entry).getXFormNamespace(); if(namespace != null) { names.put(namespace, entry.getText()); } } } } }
Source:
public void testNullFieldMetadataDebugLogging() throws NoSuchFieldException, IllegalAccessException, IOException { Path testFile = new Path("target/test/metadata_debug_log_bug.parquet"); Configuration conf = new Configuration(); deleteFile(testFile, conf); createTestFile(testFile, conf); Field debugFlag = Log.class.getField("DEBUG"); Field modifiersField = Field.class.getDeclaredField("modifiers"); modifiersField.setAccessible(true); modifiersField.setInt(debugFlag, debugFlag.getModifiers() & ~Modifier.FINAL); debugFlag.set(null, true); ParquetReader<Group> reader = ParquetReader.builder(new GroupReadSupport(), testFile).withConf(conf).build(); deleteFile(testFile, conf); }

Target:
public void testNullFieldMetadataDebugLogging() throws NoSuchFieldException, IllegalAccessException, IOException { MessageType schema = parseMessageType("message test { optional binary some_null_field; }"); org.apache.parquet.hadoop.metadata.FileMetaData fileMetaData = new org.apache.parquet.hadoop.metadata.FileMetaData(schema, new HashMap<String, String>(), null); List<BlockMetaData> blockMetaDataList = new ArrayList<BlockMetaData>(); BlockMetaData blockMetaData = new BlockMetaData(); blockMetaData.addColumn(createColumnChunkMetaData()); blockMetaDataList.add(blockMetaData); ParquetMetadata metadata = new ParquetMetadata(fileMetaData, blockMetaDataList); ParquetMetadata.toJSON(metadata); }
Source:
public CustomFormModel(final String modelId, final CustomFormModelStatus modelStatus, final OffsetDateTime requestedOn, final OffsetDateTime completedOn, final List<CustomFormSubmodel> submodels, final List<FormRecognizerError> modelError, final List<TrainingDocumentInfo> trainingDocuments) { this.modelId = modelId; this.modelStatus = modelStatus; this.requestedOn = requestedOn; this.completedOn = completedOn; this.submodels = submodels == null ? null : Collections.unmodifiableList(new ArrayList<>(submodels)); this.modelError = modelError == null ? null : Collections.unmodifiableList(new ArrayList<>(modelError)); this.trainingDocuments = trainingDocuments == null ? null : Collections.unmodifiableList(new ArrayList<>(trainingDocuments)); }

Target:
public CustomFormModel(final String modelId, final CustomFormModelStatus modelStatus, final OffsetDateTime requestedOn, final OffsetDateTime completedOn, final List<CustomFormSubmodel> submodels, final List<FormRecognizerError> modelError, final List<TrainingDocumentInfo> trainingDocuments) { this.modelId = modelId; this.modelStatus = modelStatus; this.requestedOn = requestedOn; this.completedOn = completedOn; this.submodels = submodels == null ? null : Collections.unmodifiableList(submodels); this.modelError = modelError == null ? null : Collections.unmodifiableList(modelError); this.trainingDocuments = trainingDocuments == null ? null : Collections.unmodifiableList(trainingDocuments); }
Source:
protected void deactivate() { if (modelRepo != null) { modelRepo.removeModelRepositoryChangeListener(this); } }

Target:
protected void deactivate() { if (modelRepo != null) { modelRepo.removeModelRepositoryChangeListener(this); } sitemapModelCache.clear(); }
Source:
private void setupXForwardedHeaders(Swagger swagger, Map<String, Object> headers) { String host = (String) headers.get(HEADER_HOST); if(host != null && host.length() > 0) { swagger.setHost(host); } String forwardedPrefix = (String) headers.get(HEADER_X_FORWARDED_PREFIX); if (forwardedPrefix != null && forwardedPrefix.length() > 0) { swagger.setBasePath("/" + forwardedPrefix.replace("/", "") + swagger.getBasePath()); } String forwardedHost = (String) headers.get(HEADER_X_FORWARDED_HOST); if(forwardedHost != null && forwardedHost.length() > 0) { swagger.setHost(forwardedHost); } String proto = (String) headers.get(HEADER_X_FORWARDED_PROTO); if(proto != null && proto.length() > 0) { String[] schemes = proto.split(","); List<Scheme> schs = new ArrayList<>(); for(String scheme : schemes) { String trimmedScheme = scheme.trim(); schs.add(Scheme.forValue(trimmedScheme)); } swagger.setSchemes(schs); } else { swagger.setSchemes(null); } }

Target:
private void setupXForwardedHeaders(Swagger swagger, Map<String, Object> headers) { String host = (String) headers.get(HEADER_HOST); if(ObjectHelper.isNotEmpty(host)) { swagger.setHost(host); } String forwardedPrefix = (String) headers.get(HEADER_X_FORWARDED_PREFIX); if (ObjectHelper.isNotEmpty(forwardedPrefix)) { String prefixedBasePath = "/" + URISupport.stripPrefix(forwardedPrefix, "/") + (!forwardedPrefix.endsWith("/") ? "/" : "") + URISupport.stripPrefix(swagger.getBasePath(), "/"); swagger.setBasePath(prefixedBasePath); } String forwardedHost = (String) headers.get(HEADER_X_FORWARDED_HOST); if(ObjectHelper.isNotEmpty(forwardedHost)) { swagger.setHost(forwardedHost); } String proto = (String) headers.get(HEADER_X_FORWARDED_PROTO); if(ObjectHelper.isNotEmpty(proto)) { String[] schemes = proto.split(","); List<Scheme> schs = new ArrayList<>(); for(String scheme : schemes) { String trimmedScheme = scheme.trim(); schs.add(Scheme.forValue(trimmedScheme)); } swagger.setSchemes(schs); } else { swagger.setSchemes(null); } }
Source:
public synchronized void postModelChanged(IModelDelta delta, boolean select) { if (isDisposed()) { return; } Widget viewerControl = getViewer().getControl(); if (viewerControl == null) { return; } if (select) { for (Iterator<DeltaInfo> itr = fPendingDeltas.iterator(); itr.hasNext();) { if ( itr.next().fSelect ) { itr.remove(); } } } fPendingDeltas.add(new DeltaInfo(select, delta)); if (fFireModelChangedJob == null) { fFireModelChangedJob = new WorkbenchJob(viewerControl.getDisplay(), "Select Breakpoint Job") { { setSystem(true); } @Override public IStatus runInUIThread(IProgressMonitor monitor) { Object[] deltas; synchronized(BreakpointManagerProxy.this) { deltas = fPendingDeltas.toArray(); fPendingDeltas.clear(); fFireModelChangedJob = null; } for (Object delta2 : deltas) { fireModelChanged( ((DeltaInfo)delta2).fDelta ); } return Status.OK_STATUS; } }; fFireModelChangedJob.schedule(); } }

Target:
public synchronized void postModelChanged(IModelDelta delta, boolean select) { if (isDisposed()) { return; } Widget viewerControl = getViewer().getControl(); if (viewerControl == null) { return; } if (select) { for (Iterator<DeltaInfo> itr = fPendingDeltas.iterator(); itr.hasNext();) { if ( itr.next().fSelect ) { itr.remove(); } } } fPendingDeltas.add(new DeltaInfo(select, delta)); if (fFireModelChangedJob == null) { fFireModelChangedJob = new WorkbenchJob(viewerControl.getDisplay(), "Select Breakpoint Job") { { setSystem(true); } @Override public IStatus runInUIThread(IProgressMonitor monitor) { Object[] deltas; synchronized(BreakpointManagerProxy.this) { deltas = fPendingDeltas.toArray(); fPendingDeltas.clear(); fFireModelChangedJob = null; } for (Object pendingDelta : deltas) { fireModelChanged( ((DeltaInfo)pendingDelta).fDelta ); } return Status.OK_STATUS; } }; fFireModelChangedJob.schedule(); } }
Source:
public String fetchTopSuggestions( @RequestParam(value = "query") String query, @RequestParam(value = "species", required = false, defaultValue = "") String species, @RequestParam(value = "suggestCount", required = false, defaultValue = "20") int suggestCount) { String[] splitSpecies = species.split(","); return GSON.toJson( Arrays.stream(splitSpecies) .map(speciesFactory::create) .flatMap(speciesObject -> suggesterService.fetchBioentitySuggestions( query, speciesObject, suggestCount / splitSpecies.length) .stream()) .collect(toImmutableList())); }

Target:
public String fetchTopSuggestions( @RequestParam(value = "query") String query, @RequestParam(value = "species", required = false, defaultValue = "") String species, @RequestParam(value = "suggestCount", required = false, defaultValue = "20") int suggestCount) { return GSON.toJson(suggesterService.fetchBioentitySuggestions(query, suggestCount, species.split(","))); }
Source:
public BulkLightblueResponse bulkData(AbstractBulkLightblueRequest<AbstractLightblueDataRequest> request) throws LightblueException { long t1 = new Date().getTime(); try { String responseBody = httpTransport.executeRequest(request, configuration.getDataServiceURI()); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Response received from service: " + responseBody); long t2 = new Date().getTime(); LOGGER.debug("Call took " + (t2 - t1) + "ms"); } return new BulkLightblueResponse(responseBody, request); } catch (IOException e) { LOGGER.error("There was a problem calling the lightblue service", e); throw new LightblueException("There was a problem calling the lightblue service", null, e); } catch (LightblueResponseParseException e) { throw new LightblueException("There was a problem parsing the response", null, e); } }

Target:
public BulkLightblueResponse bulkData(AbstractBulkLightblueRequest<AbstractLightblueDataRequest> request) throws LightblueException { long t1 = System.currentTimeMillis(); try { String responseBody = httpTransport.executeRequest(request, configuration.getDataServiceURI()); LOGGER.debug("Response received from service: {}", responseBody); long t2 = new Date().getTime(); LOGGER.debug("Call took {}ms", t2 - t1); return new BulkLightblueResponse(responseBody, request); } catch (IOException e) { LOGGER.error("There was a problem calling the lightblue service", e); throw new LightblueException("There was a problem calling the lightblue service", null, e); } catch (LightblueResponseParseException e) { throw new LightblueException("There was a problem parsing the response", null, e); } }
Source:
public UriPrefixingClientHttpRequestFactory(ClientHttpRequestFactory factory, String hostname, int port, String protocol) { this(factory, UriComponentsBuilder.newInstance().scheme(protocol).host(hostname).port(port).build().toUri()); }

Target:
UriPrefixingClientHttpRequestFactory(ClientHttpRequestFactory factory, String hostname, int port, String protocol) { this(factory, UriComponentsBuilder.newInstance().scheme(protocol).host(hostname).port(port).build().toUri()); }