auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected boolean canDoAction() { if (!(!Guid.Empty.equals(getVds().getstorage_pool_id()) && DbFacade.getInstance().getVdsSpmIdMapDao().get(getVdsId()) == null)) { return false; } <START> vds_spm_id_mapList = DbFacade.getInstance().getVdsSpmIdMapDao().getAll( <END> getVds().getstorage_pool_id()); if (vds_spm_id_mapList.size() >= Config.<Integer> GetValue(ConfigValues.MaxNumberOfHostsInStoragePool)) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_EXCEEDED_MAXIMUM_NUMBER_OF_HOSTS_IN_DATA_CENTER); return false; } return true; }</code><technical_language>a getVdsSpmIdMapDao() method</technical_language>

Target:
protected boolean canDoAction() { if (!(!Guid.Empty.equals(getVds().getstorage_pool_id()) && DbFacade.getInstance().getVdsSpmIdMapDao().get(getVdsId()) == null)) { return false; } vds_spm_id_mapList = DbFacade.getInstance().getVdsSpmIdMapDao().getAll( getVds().getstorage_pool_id()); if (vds_spm_id_mapList.size() >= Config.<Integer> GetValue(ConfigValues.MaxNumberOfHostsInStoragePool)) { VdcFault fault = new VdcFault(); fault.setMessage("The maximum number of Hosts allowed in the Data Center has been reached"); getReturnValue().setFault(fault); return false; } return true; }
Source:
<code>public void testMultiAdjacentPartitionedParallelChildren() throws Exception { checkUdpSupported(); List<String> stringList = getListOfUniqueStrings(800); String stringArray[] = new String[800]; stringArray = stringList.toArray(stringArray); Topology topology = newTopology("testAdj"); TStream<String> out0 = topology.strings(stringArray).parallel(of(3), (String s) -> s.hashCode() % 20); <START> out0 = out0.transform(randomStringProducer("region1")).endParallel(); <END> TStream<String> out2 = out0.parallel(of(5), (String s) -> s.hashCode() % 30); out2 = out2.transform(randomStringProducer("region2")).endParallel(); TStream<String> out3 = out0.parallel(of(2), (String s) -> s.hashCode() % 40); out3 = out3.transform(randomStringProducer("region3")).endParallel(); TStream<String> numRegions2 = out2.flatMap(uniqueStringCounter(800, "region")); TStream<String> numRegions3 = out3.flatMap(uniqueStringCounter(800, "region")); Tester tester = topology.getTester(); Condition<List<String>> assertFinished2 = tester.stringContentsUnordered(numRegions2, "3", "5"); Condition<List<String>> assertFinished3 = tester.stringContentsUnordered(numRegions3, "3", "2"); Condition<Long> expectedCount2 = tester.tupleCount(out2, 800); Condition<Long> expectedCount3 = tester.tupleCount(out3, 800); complete(tester, allConditions(assertFinished2, expectedCount2, assertFinished3, expectedCount3), 60, TimeUnit.SECONDS); assertTrue(expectedCount2.valid()); assertTrue(expectedCount3.valid()); assertTrue(assertFinished2.valid()); assertTrue(assertFinished3.valid()); }</code><technical_language>Please map deprecated transform</technical_language>

Target:
public void testMultiAdjacentPartitionedParallelChildren() throws Exception { checkUdpSupported(); List<String> stringList = getListOfUniqueStrings(800); String stringArray[] = new String[800]; stringArray = stringList.toArray(stringArray); Topology topology = newTopology(); TStream<String> out1 = topology.strings(stringArray) .parallel(of(3), String::hashCode); out1 = out1.map(randomStringProducer("region1")).endParallel(); TStream<String> out2 = out1.parallel(of(5), String::hashCode); out2 = out2.filter(new ChannelFilter()) .map(randomStringProducer("region2")).endParallel(); TStream<String> out3 = out1.parallel(of(2), String::hashCode); out3 = out3.filter(new ChannelFilter()) .map(randomStringProducer("region3")).endParallel(); TStream<String> numRegions2 = out2.flatMap(uniqueStringCounter(800, "region")); TStream<String> numRegions3 = out3.flatMap(uniqueStringCounter(800, "region")); Tester tester = topology.getTester(); Condition<List<String>> assertFinished2 = tester.stringContentsUnordered(numRegions2, "3", "5"); Condition<List<String>> assertFinished3 = tester.stringContentsUnordered(numRegions3, "3", "2"); Condition<Long> expectedCount2 = tester.tupleCount(out2, 800); Condition<Long> expectedCount3 = tester.tupleCount(out3, 800); complete(tester, allConditions(assertFinished2, expectedCount2, assertFinished3, expectedCount3), 60, TimeUnit.SECONDS); assertTrue(expectedCount2.valid()); assertTrue(expectedCount3.valid()); assertTrue(assertFinished2.valid()); assertTrue(assertFinished3.valid()); }
Source:
<code>public void setup() { <START> when(fallbackIntSupplier.getAsInt()).thenReturn(FALLBACK_INT); <END> when(experimentalIntSupplier.getAsInt()).thenReturn(EXPERIMENTAL_INT); when(clock.instant()).thenReturn(Instant.ofEpochSecond(0)); }</code><technical_language>nit, this real instead of mocking i.e. () -> FALLBACK_INT</technical_language>

Target:
public void setup() { returnValueOnExperiment(); setTimeTo(Instant.ofEpochSecond(0)); }
Source:
<code><START> public synchronized void backupCheck() { <END> if (!active) { try { log.info("Backup check started."); active = true; doBackupCheck(); log.info("Backup check completed."); } finally { active = false; } } }</code><technical_language>i need sync here, check 'active' flag. This is a singleton scheduler. duration is >1 (it perform a db check) minimal interval of this job is 1 hour. need sync a class approached threads. If insist of synchronized - Lock.tryLock() instead of 'active'</technical_language>

Target:
public void backupCheck() { Lock lock = new ReentrantLock(); if (lock.tryLock()) { try { log.info("Backup check started."); doBackupCheck(); log.info("Backup check completed."); } finally { lock.unlock(); } } }
Source:
<code>public void apply() { try { final long waitEndTime = ticker.read(); final long waitTime = waitEndTime - timestamp; pullWaitStats[threadId].put(waitTime); requestWaitStats[threadId].put(waitTime); final Pair<HashedKey<K>, V> kvPair = memoryStore.get(hashedKey); final V value; if (kvPair == null) { final V initValue = parameterUpdater.initValue(hashedKey.getKey()); final Pair<HashedKey<K>, Boolean> result = memoryStore.put(hashedKey, initValue); final boolean isSuccess = result.getSecond(); if (!isSuccess) { throw new RuntimeException("The data does not exist. Tried to put the initial value, but has failed"); } value = initValue; } else { value = kvPair.getSecond(); } final long serverProcessingTime = ticker.read() - timestamp; sender.sendPullReplyMsg(srcId, hashedKey.getKey(), value, serverProcessingTime); final long processEndTime = ticker.read(); <START> final long totalProcessingTime = processEndTime - waitEndTime; <END> pullStats[threadId].put(totalProcessingTime); requestStats[threadId].put(totalProcessingTime); } catch (final Exception e) { LOG.log(Level.WARNING, "Exception occurred", e); } }</code><technical_language>I named it, serverProcessingTime totalProcessingTime hard grasp meaning. do of renaming totalProcessingTime actualProcessingTime respecitvely, providing a short description of them</technical_language>

Target:
public void apply() { try { final long waitEndTime = ticker.read(); final long waitTime = waitEndTime - timestamp; pullWaitStats[threadId].put(waitTime); requestWaitStats[threadId].put(waitTime); final Pair<HashedKey<K>, V> kvPair = memoryStore.get(hashedKey); final V value; if (kvPair == null) { final V initValue = parameterUpdater.initValue(hashedKey.getKey()); final Pair<HashedKey<K>, Boolean> result = memoryStore.put(hashedKey, initValue); final boolean isSuccess = result.getSecond(); if (!isSuccess) { throw new RuntimeException("The data does not exist. Tried to put the initial value, but has failed"); } value = initValue; } else { value = kvPair.getSecond(); } final long elapsedTimeInServer = ticker.read() - timestamp; sender.sendPullReplyMsg(srcId, hashedKey.getKey(), value, elapsedTimeInServer); final long processEndTime = ticker.read(); final long actualProcessingTime = processEndTime - waitEndTime; pullStats[threadId].put(actualProcessingTime); requestStats[threadId].put(actualProcessingTime); } catch (final Exception e) { LOG.log(Level.WARNING, "Exception occurred", e); } }
Source:
<code>private static void refreshBorderedStyle(final StyledFigure styledFigure, final BorderedStyle borderedStyle) { if (borderedStyle.getBorderSize().intValue() == 0) { styledFigure.setBorder(null); } else { LineBorder lineBorder = null; if (styledFigure.getBorder() instanceof LineBorder) { lineBorder = (LineBorder) styledFigure.getBorder(); } else { lineBorder = new LineBorder(); styledFigure.setBorder(lineBorder); } if (styledFigure instanceof Shape) { ((Shape) styledFigure).setLineWidth(0); } int borderSize = 0; if (borderedStyle.getBorderSize() != null) { borderSize = borderedStyle.getBorderSize().intValue(); } lineBorder.setWidth(borderSize); if (borderedStyle.getBorderColor() != null) { lineBorder.setColor(VisualBindingManager.getDefault().getColorFromRGBValues(borderedStyle.getBorderColor())); } if <START> (borderedStyle.getBorderSize() != null && <END> borderSize == 0) { styledFigure.setBorder(null); } } }</code><technical_language>removed. test borderSize == 0 is sufficient</technical_language>

Target:
private static void refreshBorderedStyle(final StyledFigure styledFigure, final BorderedStyle borderedStyle) { if (borderedStyle.getBorderSize().intValue() == 0) { styledFigure.setBorder(null); } else { LineBorder lineBorder = null; if (styledFigure.getBorder() instanceof LineBorder) { lineBorder = (LineBorder) styledFigure.getBorder(); } else { lineBorder = new LineBorder(); styledFigure.setBorder(lineBorder); } if (styledFigure instanceof Shape) { ((Shape) styledFigure).setLineWidth(0); } int borderSize = 0; if (borderedStyle.getBorderSize() != null) { borderSize = borderedStyle.getBorderSize().intValue(); } lineBorder.setWidth(borderSize); if (borderedStyle.getBorderColor() != null) { lineBorder.setColor(VisualBindingManager.getDefault().getColorFromRGBValues(borderedStyle.getBorderColor())); } if (borderSize == 0) { styledFigure.setBorder(null); } } }
Source:
<code>public StreamGroupInfo(Map<String, Object> map) { if (map!= null && map.size()>0) { groupInfo = map; name = (String) map.get(NAME); consumers = (long) map.get(CONSUMERS); pending = (long) map.get(PENDING); lastDeliveredId = (String) map.get(LAST_DELIVERED); <START> } else throw new IllegalArgumentException(); <END> }</code><technical_language>If throwing runtime exception map is null throw NullPointerException</technical_language>

Target:
public StreamGroupInfo(Map<String, Object> map) { groupInfo = map; name = (String) map.get(NAME); consumers = (long) map.get(CONSUMERS); pending = (long) map.get(PENDING); lastDeliveredId = (StreamEntryID) map.get(LAST_DELIVERED); }
Source:
<code><START> public int hashCode() { <END> final int prime = 31; int result = 1; result = prime * result + ((entityId == null) ? 0 : entityId.hashCode()); result = prime * result + ((entityType == null) ? 0 : entityType.hashCode()); result = prime * result + ((jobId == null) ? 0 : jobId.hashCode()); return result; }</code><technical_language>Objects.hash()? return Objects.hash(entityId, entityType, jobId);</technical_language>

Target:
public int hashCode() { return Objects.hash(entityId, jobId); }
Source:
<code>protected void processRenamedDirectories(Runnable counter) { oma.select(SQLDirectory.class).eq(SQLDirectory.RENAMED, true).limit(256).iterateAll(dir -> { try { propagateRename(dir); oma.updateStatement(SQLDirectory.class) .set(SQLDirectory.RENAMED, false) <START> .where(SQLDirectory.PARENT, dir.getId()) <END> .executeUpdate(); } catch (Exception e) { handleDirectoryDeletionException(dir, e); } counter.run(); }); }</code><technical_language>sure? shouldnt this SqlDirectory.ID == dir.getId()</technical_language>

Target:
protected void processRenamedDirectories(Runnable counter) { oma.select(SQLDirectory.class).eq(SQLDirectory.RENAMED, true).limit(CURSOR_LIMIT).iterateAll(dir -> { try { propagateRename(dir); oma.updateStatement(SQLDirectory.class) .set(SQLDirectory.RENAMED, false) .where(SQLDirectory.ID, dir.getId()) .executeUpdate(); } catch (Exception e) { handleDirectoryDeletionException(dir, e); } counter.run(); }); }
Source:
<code>public NotificationFilter getFilter() { return NotificationFilter.createEventTypeFilter(Notification.SET).or(NotificationFilter.createEventTypeFilter(Notification.UNSET)) <START> .and(NotificationFilter.createNotifierTypeFilter(EObject.class).and(NotificationFilter.NOT_TOUCH)); <END> }</code><technical_language>I if put this not_touch in position EObject type filter</technical_language>

Target:
public NotificationFilter getFilter() { return NotificationFilter.NOT_TOUCH.and(NotificationFilter.createEventTypeFilter(Notification.SET)).or(NotificationFilter.createEventTypeFilter(Notification.UNSET)) .and(NotificationFilter.createNotifierTypeFilter(EObject.class)); }
Source:
<code>LocalBufferPool( NetworkBufferPool networkBufferPool, int numberOfRequiredMemorySegments, int maxNumberOfMemorySegments, int numberOfSubpartitions, int maxBuffersPerChannel) { checkArgument(numberOfRequiredMemorySegments > 0, "Required number of memory segments (%s) should be larger than 0.", numberOfRequiredMemorySegments); checkArgument(maxNumberOfMemorySegments >= numberOfRequiredMemorySegments, "Maximum number of memory segments (%s) should not be smaller than minimum (%s).", maxNumberOfMemorySegments, numberOfRequiredMemorySegments); LOG.debug("Using a local buffer pool with {}-{} buffers", numberOfRequiredMemorySegments, maxNumberOfMemorySegments); this.networkBufferPool = networkBufferPool; this.numberOfRequiredMemorySegments = numberOfRequiredMemorySegments; this.currentPoolSize = numberOfRequiredMemorySegments; this.maxNumberOfMemorySegments = maxNumberOfMemorySegments; if (numberOfSubpartitions > 0) { checkArgument(maxBuffersPerChannel > 0, "Maximum number of buffers for each channel (%s) should be larger than 0.", maxBuffersPerChannel); } this.subpartitionBuffersCount = new int[numberOfSubpartitions]; subpartitionBufferRecyclers = new BufferRecycler[numberOfSubpartitions]; for (int i = 0; i < subpartitionBufferRecyclers.length; i++) { subpartitionBufferRecyclers[i] = new SubpartitionBufferRecycler(i, this); } this.maxBuffersPerChannel = maxBuffersPerChannel; if (checkAvailability()) { availabilityHelper.resetAvailable(); } <START> assert hasConsistentAvailability(); <END> }</code><technical_language>assert checkState()</technical_language>

Target:
LocalBufferPool( NetworkBufferPool networkBufferPool, int numberOfRequiredMemorySegments, int maxNumberOfMemorySegments, int numberOfSubpartitions, int maxBuffersPerChannel) { checkArgument(numberOfRequiredMemorySegments > 0, "Required number of memory segments (%s) should be larger than 0.", numberOfRequiredMemorySegments); checkArgument(maxNumberOfMemorySegments >= numberOfRequiredMemorySegments, "Maximum number of memory segments (%s) should not be smaller than minimum (%s).", maxNumberOfMemorySegments, numberOfRequiredMemorySegments); LOG.debug("Using a local buffer pool with {}-{} buffers", numberOfRequiredMemorySegments, maxNumberOfMemorySegments); this.networkBufferPool = networkBufferPool; this.numberOfRequiredMemorySegments = numberOfRequiredMemorySegments; this.currentPoolSize = numberOfRequiredMemorySegments; this.maxNumberOfMemorySegments = maxNumberOfMemorySegments; if (numberOfSubpartitions > 0) { checkArgument(maxBuffersPerChannel > 0, "Maximum number of buffers for each channel (%s) should be larger than 0.", maxBuffersPerChannel); } this.subpartitionBuffersCount = new int[numberOfSubpartitions]; subpartitionBufferRecyclers = new BufferRecycler[numberOfSubpartitions]; for (int i = 0; i < subpartitionBufferRecyclers.length; i++) { subpartitionBufferRecyclers[i] = new SubpartitionBufferRecycler(i, this); } this.maxBuffersPerChannel = maxBuffersPerChannel; synchronized (this.availableMemorySegments) { if (checkAvailability()) { availabilityHelper.resetAvailable(); } checkConsistentAvailability(); } }
Source:
<code>public Map<String, Integer> dumpStats() { Map<String, Integer> ret = new HashMap<String, Integer>(stats); ret.put("numTuples", numTuples()); <START> ret.put("numKeys", keyHashCodesToIndices.size()); <END> return ret; }</code><technical_language>Of this accurate number of keys approaches 2^16..</technical_language>

Target:
public Map<String, Integer> dumpStats() { Map<String, Integer> ret = new HashMap<String, Integer>(stats); ret.put("numTuples", numTuples()); ret.put("numHashCodes", keyHashCodesToIndices.size()); return ret; }
Source:
<code>public static ClassName get(TypeElement element) { checkNotNull(element, "element == null"); String simpleName = element.getSimpleName().toString(); Element enclosingElement = element.getEnclosingElement(); <START> if (enclosingElement instanceof PackageElement) { <END> Name packageName = ((PackageElement) enclosingElement).getQualifiedName(); return new ClassName(packageName.toString(), null, simpleName); } else if (enclosingElement instanceof TypeElement) { ClassName enclosingClass = get((TypeElement) enclosingElement); return enclosingClass.nestedClass(simpleName); } else if (element.asType() instanceof ErrorType) { return get("", simpleName); } throw new IllegalArgumentException("unexpected type nesting: " + element); }</code><technical_language>do this instanceof? read of docs is a single class is allowed implement multiple types</technical_language>

Target:
public static ClassName get(TypeElement element) { checkNotNull(element, "element == null"); String simpleName = element.getSimpleName().toString(); return element.getEnclosingElement().accept(new SimpleElementVisitor8<ClassName, Void>() { @Override public ClassName visitPackage(PackageElement packageElement, Void p) { return new ClassName(packageElement.getQualifiedName().toString(), null, simpleName); } @Override public ClassName visitType(TypeElement enclosingClass, Void p) { return ClassName.get(enclosingClass).nestedClass(simpleName); } @Override public ClassName visitUnknown(Element unknown, Void p) { return get("", simpleName); } @Override public ClassName defaultAction(Element enclosingElement, Void p) { throw new IllegalArgumentException("Unexpected type nesting: " + element); } }, null); }
Source:
<code>public byte[] findScreenshot(Throwable t) { byte[] result = null; if (t != null) { if (t instanceof ScreenshotException) { String encodedScreenshot = ((ScreenshotException)t).getBase64EncodedScreenshot(); <START> result = new Base64().decode(encodedScreenshot); <END> } else { result = findScreenshot(t.getCause()); } } return result; }</code><technical_language>add a separate dependency do base64 decode. <LINK_0></technical_language>

Target:
public byte[] findScreenshot(Throwable t) { byte[] result = null; if (t != null) { if (t instanceof ScreenshotException) { String encodedScreenshot = ((ScreenshotException)t).getBase64EncodedScreenshot(); result = Base64.getDecoder().decode(encodedScreenshot); } else { result = findScreenshot(t.getCause()); } } return result; }
Source:
<code>@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); <START> EditText edit = (EditText) view.findViewById(R.id.edit); <END> edit.setFocusable(true); edit.requestFocus(); ExternalProviderAuthBinding binding = ExternalProviderAuthBinding.bind(view); binding.setViewModel(viewModel); final BookingClientComponent bookingClientComponent = DaggerBookingClientComponent.builder() .bookingClientModule(new BookingClientModule(getActivity())) .build(); viewModel.handleArgs(getArguments()); binding.webView.getSettings().setJavaScriptEnabled(true); binding.webView.getSettings().setLoadWithOverviewMode(true); binding.webView.getSettings().setUseWideViewPort(true); binding.webView.setWebViewClient(viewModel.webViewClient( bookingClientComponent.getOAuth2CallbackHandler() )); viewModel.intentObservable() .observeOn(AndroidSchedulers.mainThread()) .takeUntil(lifecycle().onDestroy()) .subscribe(new Action1<Intent>() { @Override public void call(Intent intent) { getActivity().setResult(Activity.RESULT_OK, intent); getActivity().finish(); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { Toast.makeText(getActivity(), throwable.getMessage(), Toast.LENGTH_LONG).show(); getActivity().setResult(Activity.RESULT_CANCELED); getActivity().finish(); LogUtils.LOGE(TAG_EXTERNAL_AUTH, "Error on external provider auth", throwable); } }); }</code><technical_language>Is this get this view binding below? Avoid findViewById() twice</technical_language>

Target:
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); ExternalProviderAuthBinding binding = ExternalProviderAuthBinding.bind(view); binding.setViewModel(viewModel); binding.edit.setFocusable(true); binding.edit.requestFocus(); final BookingClientComponent bookingClientComponent = DaggerBookingClientComponent.builder() .bookingClientModule(new BookingClientModule(getActivity())) .build(); viewModel.handleArgs(getArguments()); binding.webView.getSettings().setJavaScriptEnabled(true); binding.webView.getSettings().setLoadWithOverviewMode(true); binding.webView.getSettings().setUseWideViewPort(true); binding.webView.setWebViewClient(viewModel.webViewClient( bookingClientComponent.getOAuth2CallbackHandler() )); viewModel.intentObservable() .observeOn(AndroidSchedulers.mainThread()) .takeUntil(lifecycle().onDestroy()) .subscribe(new Action1<Intent>() { @Override public void call(Intent intent) { getActivity().setResult(Activity.RESULT_OK, intent); getActivity().finish(); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { Toast.makeText(getActivity(), throwable.getMessage(), Toast.LENGTH_LONG).show(); getActivity().setResult(Activity.RESULT_CANCELED); getActivity().finish(); LogUtils.LOGE(TAG_EXTERNAL_AUTH, "Error on external provider auth", throwable); } }); }
Source:
<code>public void dispose() { phone.mCM.unregisterForAvailable(this); phone.mCM.unregisterForOffOrNotAvailable(this); ((GSMPhone) phone).mSIMRecords.unregisterForRecordsLoaded(this); phone.mCM.unregisterForDataStateChanged(this); <START> ((GSMPhone) phone).mCT.unregisterForVoiceCallEnded(this); <END> ((GSMPhone) phone).mCT.unregisterForVoiceCallStarted(this); ((GSMPhone) phone).mSST.unregisterForGprsAttached(this); ((GSMPhone) phone).mSST.unregisterForGprsDetached(this); ((GSMPhone) phone).mSST.unregisterForRoamingOn(this); ((GSMPhone) phone).mSST.unregisterForRoamingOff(this); this.removeCallbacksAndMessages(null); phone.getContext().unregisterReceiver(this.alarmReceiver); phone.getContext().unregisterReceiver(this.screenOnOffReceiver); phone.getContext().getContentResolver().unregisterContentObserver(this.apnObserver); if(this.allApns != null) { this.allApns.removeAll(this.allApns); } destroyAllPdpList(); this.allApns = null; this.netstat = null; this.filter = null; this.filterS = null; this.screenOnOffReceiver = null; this.mDataConnectionTracker = null; this.mResolver = null; this.apnObserver = null; this.pdpList = null; this.dataEnabled = null; this.phone = null; }</code><technical_language>casts necessary</technical_language>

Target:
public void dispose() { phone.mCM.unregisterForAvailable(this); phone.mCM.unregisterForOffOrNotAvailable(this); ((GSMPhone) phone).mSIMRecords.unregisterForRecordsLoaded(this); phone.mCM.unregisterForDataStateChanged(this); ((GSMPhone) phone).mCT.unregisterForVoiceCallEnded(this); ((GSMPhone) phone).mCT.unregisterForVoiceCallStarted(this); ((GSMPhone) phone).mSST.unregisterForGprsAttached(this); ((GSMPhone) phone).mSST.unregisterForGprsDetached(this); ((GSMPhone) phone).mSST.unregisterForRoamingOn(this); ((GSMPhone) phone).mSST.unregisterForRoamingOff(this); phone.getContext().unregisterReceiver(this.alarmReceiver); phone.getContext().unregisterReceiver(this.screenOnOffReceiver); phone.getContext().getContentResolver().unregisterContentObserver(this.apnObserver); destroyAllPdpList(); }
Source:
<code>public String toString() { return new ToStringBuilder(this).append("id", getId()) .append("author", getAuthor()) .append("text", getText()) <START> .toString(); <END> }</code><technical_language>I wondering if add author text toString method in case log a sensitive data I mean. person :)</technical_language>

Target:
public String toString() { return new ToStringBuilder(this).append("id", getId()).toString(); }
Source:
<code>public int read(byte[] bytes, int off, int len) { <START> if (len <= 0) { <END> return 0; } if (current == null) { return -1; } int bytesRead = 0; while (bytesRead < len) { if (current.remaining() > 0) { int bytesToRead = Math.min(len - bytesRead, current.remaining()); current.get(bytes, off + bytesRead, bytesToRead); bytesRead += bytesToRead; this.position += bytesToRead; } else if (!nextBuffer()) { return bytesRead > 0 ? bytesRead : -1; } } return bytesRead; }</code><technical_language>swallow error in case of len is negative. worth checking throwing IndexOutOfBoundsException if required</technical_language>

Target:
public int read(byte[] bytes, int off, int len) { if (len <= 0) { if (len < 0) { throw new IndexOutOfBoundsException("Read length must be greater than 0: " + len); } return 0; } if (current == null) { return -1; } int bytesRead = 0; while (bytesRead < len) { if (current.remaining() > 0) { int bytesToRead = Math.min(len - bytesRead, current.remaining()); current.get(bytes, off + bytesRead, bytesToRead); bytesRead += bytesToRead; this.position += bytesToRead; } else if (!nextBuffer()) { return bytesRead > 0 ? bytesRead : -1; } } return bytesRead; }
Source:
<code>public List<InterpreterCompletion> completion(String buf, int cursor) { <START> return null; <END> }</code><technical_language>A pick, I guess Collections.emptyList() returned instead of null</technical_language>

Target:
public List<InterpreterCompletion> completion(String buf, int cursor) { return Collections.emptyList(); }
Source:
<code>private ApplyPatchTask getTask(String arcPath, String scmType, String scmPath) throws Exception { final ApplyPatchTask task = new ApplyPatchTask( TestUtils.getDefaultLogger(), TestUtils.createLauncherFactory(j), TestUtils.TEST_SHA, TestUtils.TEST_DIFFERENTIAL_ID, TestUtils.TEST_CONDUIT_URL, TestUtils.TEST_CONDUIT_TOKEN, arcPath, false, false, false, false, scmType ); <START> switch (scmType) { <END> case "git": task.setGitPath(scmPath); break; case "hg": task.setHgPath(scmPath); break; case "svn": default: break; } return task; }</code><technical_language>This written a parameterized test</technical_language>

Target:
private ApplyPatchTask getTask(String arcPath, String scmType, String scmPath) throws Exception { final ApplyPatchTask task = new ApplyPatchTask( TestUtils.getDefaultLogger(), TestUtils.createLauncherFactory(j), TestUtils.TEST_SHA, TestUtils.TEST_DIFFERENTIAL_ID, TestUtils.TEST_CONDUIT_URL, TestUtils.TEST_CONDUIT_TOKEN, arcPath, false, false, false, false, scmType ); setScmPath.accept(task, scmPath); return task; }
Source:
<code>public long write( String path, ReadableByteChannel data, ByteBuffer temporaryBuffer, boolean hasData, int requiredElementAlignment ) throws IOException { try { temporaryBuffer.clear(); File file = new File( basePath, path ); file.getParentFile().mkdirs(); String filename = file.getName(); monitor.startReceivingStoreFile( file ); try { boolean isDefaultFileSystem = pageCache.getCachedFileSystem() instanceof DefaultFileSystemAbstraction; <START> if ( !isDefaultFileSystem && StoreType.shouldBeManagedByPageCache( filename ) ) <END> { int filePageSize = filePageSize( requiredElementAlignment ); try ( PagedFile pagedFile = pageCache.map( file, filePageSize, CREATE, WRITE ) ) { final long written = writeDataThroughPageCache( pagedFile, data, temporaryBuffer, hasData ); addPageCacheMoveAction( file ); return written; } } return writeDataThroughFileSystem( file, data, temporaryBuffer, hasData ); } finally { monitor.finishReceivingStoreFile( file ); } } catch ( Throwable t ) { throw new IOException( t ); } }</code><technical_language>negation avoided</technical_language>

Target:
public long write( String path, ReadableByteChannel data, ByteBuffer temporaryBuffer, boolean hasData, int requiredElementAlignment ) throws IOException { try { temporaryBuffer.clear(); File file = new File( basePath, path ); file.getParentFile().mkdirs(); String filename = file.getName(); monitor.startReceivingStoreFile( file ); try { if ( !pageCache.fileSystemSupportsFileOperations() && StoreType.canBeManagedByPageCache( filename ) ) { int filePageSize = filePageSize( requiredElementAlignment ); try ( PagedFile pagedFile = pageCache.map( file, filePageSize, CREATE, WRITE ) ) { final long written = writeDataThroughPageCache( pagedFile, data, temporaryBuffer, hasData ); addPageCacheMoveAction( file ); return written; } } return writeDataThroughFileSystem( file, data, temporaryBuffer, hasData ); } finally { monitor.finishReceivingStoreFile( file ); } } catch ( Throwable t ) { throw new IOException( t ); } }
Source:
<code>public static Scope importAndCreateScope(String name, String encodedParent) { Tracer.SpanBuilder spanBuilder; Tracer tracer = GlobalTracer.get(); SpanContext parentSpan = null; if (encodedParent != null && encodedParent.length() > 0) { StringBuilder builder = new StringBuilder(); builder.append(encodedParent); try { parentSpan = tracer.extract(StringCodec.FORMAT, builder); } catch (Exception ex) { if (LOG.isDebugEnabled()) { LOG.debug("Can't extract tracing from the message.", ex); } else { <START> LOG.warn( <END> "Can't extract tracing from the message: " + ex.getMessage()); } } } if (parentSpan == null) { spanBuilder = tracer.buildSpan(name); } else { spanBuilder = tracer.buildSpan(name).asChildOf(parentSpan); } return spanBuilder.startActive(true); }</code><technical_language>LOG.warn() only</technical_language>

Target:
public static Scope importAndCreateScope(String name, String encodedParent) { Tracer.SpanBuilder spanBuilder; Tracer tracer = GlobalTracer.get(); SpanContext parentSpan = null; if (encodedParent != null && encodedParent.length() > 0) { StringBuilder builder = new StringBuilder(); builder.append(encodedParent); parentSpan = tracer.extract(StringCodec.FORMAT, builder); } if (parentSpan == null) { spanBuilder = tracer.buildSpan(name); } else { spanBuilder = tracer.buildSpan(name).asChildOf(parentSpan); } return spanBuilder.startActive(true); }
Source:
<code>public static Bitmap getImage(String imageLocation) { Bitmap _image; if (mEnableCache) { <START> _image = mCache.get(imageLocation); <END> if (_image == null) { _image = BitmapFactory.decodeFile(imageLocation); if (_image != null) { mCache.put(imageLocation, _image); } } } else { _image = BitmapFactory.decodeFile(imageLocation); } return _image; }</code><technical_language>"if" here, extract a method. For example: Bitmap getImageFromCache(string imgLocation) { ... }</technical_language>

Target:
public static Bitmap getImage(String imageLocation) { Bitmap image = null; if (mEnableCache) { image = getImageFromCache(imageLocation); } else { image = BitmapFactory.decodeFile(imageLocation); } return image; }
Source:
<code>public void testIfDependentMethodsAreInvokedWhenRetrySucceeds() { TestNG testng = create(TestClassSampleWithTestMethodDependencies.class); InvokedMethodNameListener listener = new InvokedMethodNameListener(); testng.addListener(listener); testng.run(); assertThat(listener.getSucceedMethodNames()).containsExactly("a", "b"); assertThat(listener.getFailedMethodNames()).containsExactly("a"); <START> assertThat(listener.getSkippedMethodNames()).containsExactly("a"); <END> }</code><technical_language>I if skipped methods be: "b", "a", "b"</technical_language>

Target:
public void testIfDependentMethodsAreInvokedWhenRetrySucceeds() { TestNG testng = create(TestClassSampleWithTestMethodDependencies.class); TestListenerAdapter tla = new TestListenerAdapter(); testng.addListener(tla); testng.run(); assertThat(tla.getPassedTests() .stream() .map(RetryAnalyzerTest::methodName) .collect(Collectors.toList()) ).containsExactly("a", "b"); assertThat(tla.getFailedTests()).isEmpty(); assertThat(tla.getSkippedTests() .stream() .map(RetryAnalyzerTest::methodName) .collect(Collectors.toList()) ).containsExactly("a"); }
Source:
<code>public void call(Subscriber<? super T> subscriber) { try { final Resource resource = resourceFactory.call(); <START> final Action0 disposeOnceOnly = createOnceOnlyDisposeAction(resource); <END> subscriber.add(Subscriptions.create(disposeOnceOnly)); final Observable<? extends T> source = observableFactory .call(resource); final Observable<? extends T> observable; if (disposeEagerly) observable = source .doOnTerminate(disposeOnceOnly); else observable = source; try { observable.unsafeSubscribe(subscriber); } catch (Throwable e) { Throwable disposeError = disposeEagerlyIfRequested(disposeOnceOnly); if (disposeError != null) subscriber.onError(new CompositeException(Arrays.asList(e, disposeError))); else subscriber.onError(e); } } catch (Throwable e) { subscriber.onError(e); } }</code><technical_language>a class implements Action0 subscription avoid creating objects: java static final class DisposeAction<R> extends AtomicBoolean implements Action0, Subscription { Action1<? super R> dispose; R resource; public DisposeAction(Action1<? super R> dispose, R resource) { this.dispose = dispose; this.resource = resource; lazySet(false); // StoreStore barrier } @Override public void call() { if (compareAndSet(false, true)) { try { dispose.call(resource); } finally { resource = null; dispose = null; } } } @Override public boolean isUnsubscribed() { return get(); } public void unsubscribe() { call(); } }</technical_language>

Target:
public void call(Subscriber<? super T> subscriber) { try { final Resource resource = resourceFactory.call(); final DisposeAction<Resource> disposeOnceOnly = new DisposeAction<Resource>(dispose, resource); subscriber.add(disposeOnceOnly); final Observable<? extends T> source = observableFactory .call(resource); final Observable<? extends T> observable; if (disposeEagerly) observable = source .doOnTerminate(disposeOnceOnly); else observable = source; try { observable.unsafeSubscribe(subscriber); } catch (Throwable e) { Throwable disposeError = disposeEagerlyIfRequested(disposeOnceOnly); if (disposeError != null) subscriber.onError(new CompositeException(Arrays.asList(e, disposeError))); else subscriber.onError(e); } } catch (Throwable e) { subscriber.onError(e); } }
Source:
<code>public void removeBeforePublishPostProcessor(MessagePostProcessor beforePublishPostProcessor) { Assert.notNull(beforePublishPostProcessor, "'beforePublishPostProcessor' cannot be null"); <START> if (this.beforePublishPostProcessors != null) { <END> this.beforePublishPostProcessors.remove(beforePublishPostProcessor); } }</code><technical_language>is reason this if, covered previous Assert.notNull(). return boolean removal result though</technical_language>

Target:
public boolean removeBeforePublishPostProcessor(MessagePostProcessor beforePublishPostProcessor) { Assert.notNull(beforePublishPostProcessor, "'beforePublishPostProcessor' cannot be null"); if (this.beforePublishPostProcessors != null) { return this.beforePublishPostProcessors.remove(beforePublishPostProcessor); } return false; }
Source:
<code>public static void main(String[] args) { <START> LOG.info("Starting PYAPEX with " + StringUtils.join(args,' ')); <END> PropertyConfigurator.configure("./log.properties"); PyApex pythonEntryPoint = new PyApex(); GatewayServer gatewayServer = new GatewayServer(pythonEntryPoint); gatewayServer.start(); LOG.debug("Gateway Server Started"); }</code><technical_language>{} pattern for LOG statements. for example LOG.info("Starting PYAPEX {}", StringUtils.join(args,' '));</technical_language>

Target:
public static void main(String[] args) { LOG.info("Starting PYAPEX with {}", StringUtils.join(args, ' ')); Options options = new Options(); Option input = new Option("m", "mode", true, "Launch Mode"); input.setRequired(false); options.addOption(input); Option pyfile = new Option("l", "launch-file", true, "Launch file"); pyfile.setRequired(false); options.addOption(pyfile); CommandLineParser parser = new BasicParser(); HelpFormatter formatter = new HelpFormatter(); CommandLine cmd; try { cmd = parser.parse(options, args); } catch (ParseException e) { LOG.error("Parsing Exception while parsing arguments",e); formatter.printHelp("utility-name", options); System.exit(1); return; } String launchModeValue = cmd.getOptionValue("mode"); PythonAppManager.LaunchMode mode = launchModeValue != null ? PythonAppManager.LaunchMode.valueOf(launchModeValue) : null; LOG.info("Starting PYAPEX with {}", mode); PyApex pythonEntryPoint = new PyApex(mode); GatewayServer gatewayServer = new GatewayServer(pythonEntryPoint); gatewayServer.start(); LOG.debug("Gateway Server Started"); }
Source:
<code>public Survey createSurvey(Survey survey) { checkNotNull(survey, "Survey cannot be null"); survey.setGuid(BridgeUtils.generateGuid()); for (SurveyElement element : survey.getElements()) { element.setGuid(BridgeUtils.generateGuid()); } Set<String> dataGroups = Collections.emptySet(); if (survey.getStudyIdentifier() != null) { Study study = studyService.getStudy(survey.getStudyIdentifier()); dataGroups = study.getDataGroups(); } Validate.entityThrowingException(new SurveySaveValidator(dataGroups), survey); StudyIdentifier studyId = new StudyIdentifierImpl(survey.getStudyIdentifier()); String existingSurveyGuid = surveyDao.getSurveyGuidForIdentifier(studyId, survey.getIdentifier()); if (existingSurveyGuid != null) { String errMsg = "Survey identifier " + survey.getIdentifier() + " is already used by survey " + existingSurveyGuid; Map<String, Object> entityKeyMap = ImmutableMap.of(KEY_IDENTIFIER, survey.getIdentifier()); throw new EntityAlreadyExistsException(Survey.class, errMsg, entityKeyMap); <START> } <END> return surveyDao.createSurvey(survey); }</code><technical_language>mind, this kind of a constraint thrown throw a validation exception</technical_language>

Target:
public Survey createSurvey(Survey survey) { checkNotNull(survey, "Survey cannot be null"); if (isNotBlank(survey.getStudyIdentifier()) && isNotBlank(survey.getIdentifier())) { StudyIdentifier studyId = new StudyIdentifierImpl(survey.getStudyIdentifier()); String existingSurveyGuid = surveyDao.getSurveyGuidForIdentifier(studyId, survey.getIdentifier()); if (existingSurveyGuid != null) { String errMsg = "Survey identifier " + survey.getIdentifier() + " is already used by survey " + existingSurveyGuid; Map<String, Object> entityKeyMap = ImmutableMap.of(KEY_IDENTIFIER, survey.getIdentifier()); throw new EntityAlreadyExistsException(Survey.class, errMsg, entityKeyMap); } } survey.setGuid(BridgeUtils.generateGuid()); for (SurveyElement element : survey.getElements()) { element.setGuid(BridgeUtils.generateGuid()); } Set<String> dataGroups = Collections.emptySet(); if (survey.getStudyIdentifier() != null) { Study study = studyService.getStudy(survey.getStudyIdentifier()); dataGroups = study.getDataGroups(); } Validate.entityThrowingException(new SurveySaveValidator(dataGroups), survey); return surveyDao.createSurvey(survey); }
Source:
<code>protected void drawAll(Canvas canvas, int multilineWidth) { if (text.get() == null) { text.set(""); } <START> if (text.get().equals("") && linesOfText == null) { <END> text.set(hintText); isShowingHintText = true; } if (isShowingHintText) { setCursorPosition(0); if (!text.get().equals(hintText) && text.get().endsWith(hintText)) { text.set(text.get().substring(0, text.get().length() - hintText.length())); setCursorPosition(text.get().length()); isShowingHintText = false; } } lastFont = canvas.getCurrentStyle().getFont(); correctCursor(); String textToDraw = passwordMode ? buildPasswordString() : getText(); int widthForDraw = (multiline) ? multilineWidth : lastFont.getWidth(textToDraw); try (SubRegion ignored = canvas.subRegion(canvas.getRegion(), true); SubRegion ignored2 = canvas.subRegion(Rect2i.createFromMinAndSize(-offset, 0, widthForDraw + 1, Integer.MAX_VALUE), false)) { if (isShowingHintText && !readOnly) { canvas.drawTextRaw(textToDraw, lastFont, canvas.getCurrentStyle().getHintTextColor(), canvas.getRegion()); } else { canvas.drawText(textToDraw, canvas.getRegion()); } if (isFocused()) { if (hasSelection()) { drawSelection(canvas); } else { drawCursor(canvas); } } } }</code><technical_language>isEmpty() call a null check. worry NPE's else in code handles case of empty array. For instance, set a default of empty array above, clash this condition</technical_language>

Target:
protected void drawAll(Canvas canvas, int multilineWidth) { if (text.get() == null) { text.set(""); } if (text.get().equals("") && linesOfText.length > 0) { text.set(hintText); isShowingHintText = true; } if (isShowingHintText) { setCursorPosition(0); if (!text.get().equals(hintText) && text.get().endsWith(hintText)) { text.set(text.get().substring(0, text.get().length() - hintText.length())); setCursorPosition(text.get().length()); isShowingHintText = false; } } lastFont = canvas.getCurrentStyle().getFont(); correctCursor(); String textToDraw = passwordMode ? buildPasswordString() : getText(); int widthForDraw = (multiline) ? multilineWidth : lastFont.getWidth(textToDraw); try (SubRegion ignored = canvas.subRegion(canvas.getRegion(), true); SubRegion ignored2 = canvas.subRegion(Rect2i.createFromMinAndSize(-offset, 0, widthForDraw + 1, Integer.MAX_VALUE), false)) { if (isShowingHintText && !readOnly) { canvas.drawTextRaw(textToDraw, lastFont, canvas.getCurrentStyle().getHintTextColor(), canvas.getRegion()); } else { canvas.drawText(textToDraw, canvas.getRegion()); } if (isFocused()) { if (hasSelection()) { drawSelection(canvas); } else { drawCursor(canvas); } } } }
Source:
<code>public static FileformatInterface parsePicaFormat(Node pica, PrefsInterface prefs) <START> throws ReadException, PreferencesException, TypeNotAllowedForParentException { <END> PicaPlusInterface pp = UghImplementation.INSTANCE.createPicaPlus(prefs); pp.read(pica); DigitalDocumentInterface dd = pp.getDigitalDocument(); FileformatInterface ff = UghImplementation.INSTANCE.createXStream(prefs); ff.setDigitalDocument(dd); DocStructTypeInterface dst = prefs.getDocStrctTypeByName("BoundBook"); DocStructInterface dsBoundBook = dd.createDocStruct(dst); dd.setPhysicalDocStruct(dsBoundBook); return ff; }</code><technical_language>TypeNotAllowedForParentException - exception</technical_language>

Target:
public static FileformatInterface parsePicaFormat(Node pica, PrefsInterface prefs) throws ReadException, PreferencesException { PicaPlusInterface pp = UghImplementation.INSTANCE.createPicaPlus(prefs); pp.read(pica); DigitalDocumentInterface dd = pp.getDigitalDocument(); FileformatInterface ff = UghImplementation.INSTANCE.createXStream(prefs); ff.setDigitalDocument(dd); DocStructTypeInterface dst = prefs.getDocStrctTypeByName("BoundBook"); DocStructInterface dsBoundBook = dd.createDocStruct(dst); dd.setPhysicalDocStruct(dsBoundBook); return ff; }
Source:
<code>private static void accessLocation() { ServiceConnection connection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName name, IBinder service) { long timeout = LOCATION_ACCESS_TIMEOUT_MILLIS; <START> (new Handler()).postDelayed(() -> sContext.unbindService(this), timeout); <END> } @Override public void onServiceDisconnected(ComponentName name) { } }; Intent testAppService = new Intent(); testAppService.setComponent(new ComponentName(TEST_APP_PKG, TEST_APP_SERVICE)); sContext.bindService(testAppService, connection, BIND_AUTO_CREATE); }</code><technical_language>@After method unbinds this connection. This is more reliable</technical_language>

Target:
private static void accessLocation() { sConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName name, IBinder service) { } @Override public void onServiceDisconnected(ComponentName name) { } }; Intent testAppService = new Intent(); testAppService.setComponent(new ComponentName(TEST_APP_PKG, TEST_APP_SERVICE)); sContext.bindService(testAppService, sConnection, BIND_AUTO_CREATE); }
Source:
<code>public void init(ComponentRegistry componentRegistry) { <START> if(f instanceof CommandFunction) componentRegistry.wireDependencies(((CommandFunction)f).getRemappingFunction()); <END> }</code><technical_language>missing spaces..</technical_language>

Target:
public void init(ComponentRegistry componentRegistry) { if (f instanceof InjectableComponent) { ((InjectableComponent) f).inject(componentRegistry); } }
Source:
<code>public void testReplaceWidgetOnForm() { Form form = new Form(new PropertiesImpl("bar") { }, "foo"); Form nestedForm = new Form(new PropertiesImpl("foo") { }, "bar"); form.addRow(widget(newString("w1"))); form.addColumn(widget(newString("w2"))); form.addRow(widget(nestedForm)); assertEquals(form.getWidget("w2").getRow(), 1); assertEquals(form.getWidget("w2").getOrder(), 2); form.replaceRow("w2", widget(newString("w3"))); assertTrue(form.getWidget("w2") == null); assertEquals(form.getWidget("w3").getRow(), 1); assertEquals(form.getWidget("w3").getOrder(), 2); <START> } <END></code><technical_language>This nice test result of call of PropertiesDynamicMethodHelper.setWidgetLayoutMethods(properties, widgetName, widget);</technical_language>

Target:
public void testReplaceWidgetOnForm() { Form form = new Form(new PropertiesWithReplaceables("bar") { }, "foo"); Form nestedForm = new Form(new PropertiesImpl("foo") { }, "bar"); form.addRow(widget(newString("w1"))); form.addColumn(widget(newString("w2"))); form.addRow(widget(nestedForm)); assertEquals(form.getWidget("w2").getRow(), 1); assertEquals(form.getWidget("w2").getOrder(), 2); Widget newWidget = widget(newString("w3")); form.replaceRow("w2", newWidget); assertTrue(form.getWidget("w2") == null); assertEquals(form.getWidget("w3").getRow(), 1); assertEquals(form.getWidget("w3").getOrder(), 2); assertTrue(newWidget.isCallAfter()); assertTrue(newWidget.isCallBeforePresent()); assertFalse(newWidget.isCallBeforeActivate()); assertFalse(newWidget.isCallValidate()); }
Source:
<code>public void testHex() { <START> assertThat(faker.random().hex(8), matchesRegularExpression("^[0-9A-F]{8}$")); <END> }</code><technical_language>This called randomservice faker</technical_language>

Target:
public void testHex() { assertThat(randomService.hex(8), matchesRegularExpression("^[0-9A-F]{8}$")); }
Source:
<code>public Model get() { final HttpUriRequest request = new HttpGet(identifier); if (!"".equals(this.fedoraAuth)) { final String creds = this.fedoraUsername + ":" + this.fedoraPassword; <START> LOGGER.debug("Adding BASIC authentication: {}...", creds); <END> final String encoding = new String(Base64.encodeBase64(creds.getBytes())); request.setHeader("Authorization", this.fedoraAuth + " " + encoding); } request.addHeader("Accept", RDF_SERIALIZATION); LOGGER.debug("Retrieving RDF content from: {}...", request.getURI()); try { final HttpResponse response = httpClient.execute(request); if (response.getStatusLine().getStatusCode() == SC_OK) { try ( Reader r = new InputStreamReader( response.getEntity().getContent(), "UTF8")) { return createDefaultModel().read(r, "", "N3"); } } else { throw new HttpException(response.getStatusLine().toString()); } } catch (IOException | HttpException e) { throw propagate(e); } }</code><technical_language>do want print username password out in logging</technical_language>

Target:
public Model get() { final HttpUriRequest request = new HttpGet(identifier); request.addHeader("Accept", RDF_SERIALIZATION); LOGGER.debug("Retrieving RDF content from: {}...", request.getURI()); try { final HttpResponse response = httpClient.execute(request, this.httpContext); if (response.getStatusLine().getStatusCode() == SC_OK) { try ( Reader r = new InputStreamReader( response.getEntity().getContent(), "UTF8")) { return createDefaultModel().read(r, "", "N3"); } } else { throw new HttpException(response.getStatusLine().toString()); } } catch (IOException | HttpException e) { throw propagate(e); } }