auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public SceneElement createSceneElement(String imagePath) { EditorGameAssets assets = controller.getEditorGameAssets(); String newPath = imagePath; if (!assets.isLoaded(imagePath, Texture.class)) { if (assets.resolve(imagePath).exists()) { assets.load(imagePath, Texture.class); } else { newPath = controller.getEditorGameAssets().copyAndLoad( imagePath, Texture.class); } controller.getEditorGameAssets().finishLoading(); } Texture texture = controller.getEditorGameAssets().get(newPath, Texture.class); SceneElement sceneElement = new SceneElement(); Image renderer = new Image(); renderer.setUri(newPath); sceneElement.setRenderer(renderer); Transformation transformation = new Transformation(); transformation.setOriginX(texture.getWidth() / 2.0f); transformation.setOriginY(texture.getHeight() / 2.0f); sceneElement.setTransformation(transformation); TextureData td = texture.getTextureData(); td.prepare(); <START> sceneElement.getCollisionPolygons().clear(); <END> sceneElement.getCollisionPolygons().addAll( GeometryUtils.findPolygons(td.consumePixmap())); return sceneElement; }</code><technical_language>Unnecessary clear. scene element created some lines before</technical_language>

Target:
public SceneElement createSceneElement(String imagePath) { EditorGameAssets assets = controller.getEditorGameAssets(); String newPath = imagePath; if (!assets.isLoaded(imagePath, Texture.class)) { if (assets.resolve(imagePath).exists()) { assets.load(imagePath, Texture.class); } else { newPath = controller.getEditorGameAssets().copyAndLoad( imagePath, Texture.class); } controller.getEditorGameAssets().finishLoading(); } Texture texture = controller.getEditorGameAssets().get(newPath, Texture.class); SceneElement sceneElement = new SceneElement(); Image renderer = new Image(); renderer.setUri(newPath); sceneElement.setRenderer(renderer); Transformation transformation = new Transformation(); transformation.setOriginX(texture.getWidth() / 2.0f); transformation.setOriginY(texture.getHeight() / 2.0f); sceneElement.setTransformation(transformation); TextureData td = texture.getTextureData(); td.prepare(); sceneElement.getCollisionPolygons().addAll( GeometryUtils.findPolygons(td.consumePixmap())); return sceneElement; }
Source:
<code>int nextSpan(int distanceFromTip) { if (distanceFromTip < 0) <START> throw new IllegalArgumentException(); <END> if (distanceFromTip <= recentCommitCount) return recentCommitSpan; int next = Math.min(distanceFromTip - recentCommitCount, distantCommitSpan); return Math.max(next, recentCommitSpan); }</code><technical_language>(nit) braces one-line if body</technical_language>

Target:
int nextSpan(int distanceFromTip) { if (distanceFromTip < 0) { throw new IllegalArgumentException(); } if (distanceFromTip <= recentCommitCount) { return recentCommitSpan; } int next = Math.min(distanceFromTip - recentCommitCount, distantCommitSpan); return Math.max(next, recentCommitSpan); }
Source:
<code>private String getSerializationLanguage(final MediaType baseMediaType) { if(baseMediaType == null) { throw new IllegalArgumentException("Base media type can't be null"); } List<Map.Entry<MediaType, String>> mediaPairs = new ArrayList<>(); mediaPairs.add(new AbstractMap.SimpleEntry<>(OslcMediaType.TEXT_TURTLE_TYPE, RDFLanguages.strLangTurtle)); mediaPairs.add(new AbstractMap.SimpleEntry<>(OslcMediaType.APPLICATION_JSON_LD_TYPE, RDFLanguages.strLangJSONLD)); <START> mediaPairs.add(new AbstractMap.SimpleEntry<>(OslcMediaType.TEXT_XML_TYPE, <END> RDFLanguages.strLangRDFXML)); if (OSLC4JUtils.alwaysAbbrevXML()) { mediaPairs.add(new AbstractMap.SimpleEntry<>(OslcMediaType.APPLICATION_RDF_XML_TYPE, FileUtils.langXMLAbbrev)); } else { mediaPairs.add(new AbstractMap.SimpleEntry<>(OslcMediaType.APPLICATION_RDF_XML_TYPE, RDFLanguages.strLangRDFXML)); } mediaPairs.add(new AbstractMap.SimpleEntry<>(OslcMediaType.APPLICATION_XML_TYPE, FileUtils.langXMLAbbrev)); for (Map.Entry<MediaType, String> mediaPair : mediaPairs) { if (baseMediaType.isCompatible(mediaPair.getKey())) { log.trace("Using '{}' writer for '{}' Accept media type", mediaPair.getValue(), mediaPair.getKey()); return mediaPair.getValue(); } } throw new IllegalArgumentException("Base media type can't be matched to any writer"); }</code><technical_language>suggest remove this? re: package org.eclipse.lyo.oslc4j.provider.jena; @Provider @Produces({OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML}) @Consumes({OslcMediaType.APPLICATION_XML, OslcMediaType.TEXT_XML}) public class OslcXmlProvider extends OslcRdfXmlProvider { This provider is registered, work properly getSerializationLanguage included in list</technical_language>

Target:
private String getSerializationLanguage(final MediaType baseMediaType) { if(baseMediaType == null) { throw new IllegalArgumentException("Base media type can't be null"); } List<Map.Entry<MediaType, String>> mediaPairs = new ArrayList<>(); mediaPairs.add(new AbstractMap.SimpleEntry<>(OslcMediaType.TEXT_TURTLE_TYPE, RDFLanguages.strLangTurtle)); mediaPairs.add(new AbstractMap.SimpleEntry<>(OslcMediaType.APPLICATION_JSON_LD_TYPE, RDFLanguages.strLangJSONLD)); if (OSLC4JUtils.alwaysAbbrevXML()) { mediaPairs.add(new AbstractMap.SimpleEntry<>(OslcMediaType.APPLICATION_RDF_XML_TYPE, FileUtils.langXMLAbbrev)); } else { mediaPairs.add(new AbstractMap.SimpleEntry<>(OslcMediaType.APPLICATION_RDF_XML_TYPE, RDFLanguages.strLangRDFXML)); } mediaPairs.add(new AbstractMap.SimpleEntry<>(OslcMediaType.APPLICATION_XML_TYPE, FileUtils.langXMLAbbrev)); for (Map.Entry<MediaType, String> mediaPair : mediaPairs) { if (baseMediaType.isCompatible(mediaPair.getKey())) { log.trace("Using '{}' writer for '{}' Accept media type", mediaPair.getValue(), mediaPair.getKey()); return mediaPair.getValue(); } } throw new IllegalArgumentException("Base media type can't be matched to any writer"); }
Source:
<code>public static List<CoverageBucket> getCoverageBuckets(String readGroupSetId, GenomicsFactory.OfflineAuth auth) throws IOException, GeneralSecurityException { Genomics genomics = auth.getGenomics(auth.getDefaultFactory()); ListCoverageBucketsResponse response = genomics.readgroupsets().coveragebuckets().list(readGroupSetId).execute(); <START> if(null != response.getNextPageToken()) { <END> throw new IllegalArgumentException("Read group set " + readGroupSetId + " has more Coverage Buckets than the default page size for the CoverageBuckets list operation."); } return response.getCoverageBuckets(); }</code><technical_language>nit: space 'if'</technical_language>

Target:
public static List<CoverageBucket> getCoverageBuckets(String readGroupSetId, GenomicsFactory.OfflineAuth auth) throws IOException, GeneralSecurityException { Genomics genomics = auth.getGenomics(auth.getDefaultFactory()); ListCoverageBucketsResponse response = genomics.readgroupsets().coveragebuckets().list(readGroupSetId).execute(); if (!Strings.isNullOrEmpty(response.getNextPageToken())) { throw new IllegalArgumentException("Read group set " + readGroupSetId + " has more Coverage Buckets than the default page size for the CoverageBuckets list operation."); } return response.getCoverageBuckets(); }
Source:
<code>protected void run(Server server, User user, String commandLabel, String[] args) throws Exception { RandomTeleport randomTeleport = ess.getRandomTeleport(); if (args.length == 0 || "center".equalsIgnoreCase(args[0])) { randomTeleport.setCenter(user.getLocation()); <START> user.sendMessage(tl("settpr", "center")); <END> } else if (args.length > 1) { if ("minrange".equalsIgnoreCase(args[0])) { randomTeleport.setMinRange(Double.parseDouble(args[1])); } else if ("maxrange".equalsIgnoreCase(args[0])) { randomTeleport.setMaxRange(Double.parseDouble(args[1])); } user.sendMessage(tl("settprValue", args[0].toLowerCase(), args[1].toLowerCase())); } }</code><technical_language>English literals ruin point of translation :P</technical_language>

Target:
protected void run(Server server, User user, String commandLabel, String[] args) throws Exception { RandomTeleport randomTeleport = ess.getRandomTeleport(); randomTeleport.getCachedLocations().clear(); if (args.length == 0 || "center".equalsIgnoreCase(args[0])) { randomTeleport.setCenter(user.getLocation()); user.sendMessage(tl("settpr")); } else if (args.length > 1) { if ("minrange".equalsIgnoreCase(args[0])) { randomTeleport.setMinRange(Double.parseDouble(args[1])); } else if ("maxrange".equalsIgnoreCase(args[0])) { randomTeleport.setMaxRange(Double.parseDouble(args[1])); } user.sendMessage(tl("settprValue", args[0].toLowerCase(), args[1].toLowerCase())); } }
Source:
<code>public User getUserByName(String username) { UserIdentificationDAO userIdentificationDAO = DAOFactory.getInstance().getUserIdentificationDAO(); InternalAuthDAO internalAuthDAO = DAOFactory.getInstance().getInternalAuthDAO(); InternalAuth internalAuth = internalAuthDAO.findByUsername(username); if (internalAuth != null) { UserIdentification userIdentification = userIdentificationDAO.findByAuthSourceAndExternalId(getName(), String.valueOf(internalAuth.getId())); if(userIdentification != null){ return userIdentification.getPerson().getDefaultUser(); } <START> logger.warning("UserIdentification is null"); <END> return null; } else { return null; } }</code><technical_language>need log warning. this method is test a username is available, username belonging is perfectly normal simply returns null;</technical_language>

Target:
public User getUserByName(String username) { UserIdentificationDAO userIdentificationDAO = DAOFactory.getInstance().getUserIdentificationDAO(); InternalAuthDAO internalAuthDAO = DAOFactory.getInstance().getInternalAuthDAO(); InternalAuth internalAuth = internalAuthDAO.findByUsername(username); if (internalAuth != null) { UserIdentification userIdentification = userIdentificationDAO.findByAuthSourceAndExternalId(getName(), String.valueOf(internalAuth.getId())); if(userIdentification != null){ return userIdentification.getPerson().getDefaultUser(); } return null; } else { return null; } }
Source:
<code>public PatchLink createLink(int index, PatchScreen.Type patchType, SafeHtml before, SafeHtml after) { Patch patch = patchList.get(index); Key thisKey = patch.getKey(); PatchLink link; boolean <START> newScrren = <END> Dispatcher.isChangeScreen2(); if (newScrren && (detail.getPatches().get(index).getPatchType() .equals(PatchType.BINARY) || Gerrit.getUserAccount() .getGeneralPreferences().getDiffView() .equals(DiffView.UNIFIED_DIFF)) || !newScrren && patchType == PatchScreen.Type.UNIFIED) { link = new PatchLink.Unified("", base, thisKey, index, detail, this); } else { link = new PatchLink.SideBySide("", base, thisKey, index, detail, this); } SafeHtmlBuilder text = new SafeHtmlBuilder(); text.append(before); text.append(getFileNameOnly(patch)); text.append(after); SafeHtml.set(link, text); return link; }</code><technical_language>newScreen</technical_language>

Target:
public PatchLink createLink(int index, PatchScreen.Type patchType, SafeHtml before, SafeHtml after) { Patch patch = patchList.get(index); Key thisKey = patch.getKey(); PatchLink link; boolean isNewScreen = Dispatcher.isChangeScreen2(); if (isNewScreen && (detail.getPatches().get(index).getPatchType() .equals(PatchType.BINARY) || Gerrit.getUserAccount() .getGeneralPreferences().getDiffView() .equals(DiffView.UNIFIED_DIFF)) || !isNewScreen && patchType == PatchScreen.Type.UNIFIED) { link = new PatchLink.Unified("", base, thisKey, index, detail, this); } else { link = new PatchLink.SideBySide("", base, thisKey, index, detail, this); } SafeHtmlBuilder text = new SafeHtmlBuilder(); text.append(before); text.append(getFileNameOnly(patch)); text.append(after); SafeHtml.set(link, text); return link; }
Source:
<code><START> protected ICommand getSetSAPKindCommand(final Port serviceAccessPoint) { <END> RecordingCommand command = new RecordingCommand(TransactionUtil.getEditingDomain(serviceAccessPoint)) { @Override protected void doExecute() { serviceAccessPoint.setIsService(false); serviceAccessPoint.setIsBehavior(true); RTPort stereotype = UMLUtil.getStereotypeApplication(serviceAccessPoint, RTPort.class); stereotype.setIsWired(false); stereotype.setIsPublish(false); serviceAccessPoint.setVisibility(VisibilityKind.PROTECTED_LITERAL); } }; ICommand cmd = EMFtoGMFCommandWrapper.wrap(command); return cmd; }</code><technical_language>RTPortUtils::getChangeKindCommand(Port, RTPortKindEnum) for this. provides EMF command, is easily wrapped for this usage</technical_language>

Target:
protected ICommand getSetSAPKindCommand(final Port serviceAccessPoint) { Command command = RTPortUtils.getChangeKindCommand(serviceAccessPoint, RTPortKindEnum.SAP); ICommand cmd = EMFtoGMFCommandWrapper.wrap(command); return cmd; }
Source:
<code><START> protected WorkbenchJob doCreateRefreshJob() { <END> WorkbenchJob job = super.doCreateRefreshJob(); return new WorkbenchJob("Refresh Filter") { @Override public IStatus runInUIThread(IProgressMonitor monitor) { if (fCheckboxTreeViewer.getTree().isDisposed()) { return Status.CANCEL_STATUS; } Object[] expandedBefore = fCheckboxTreeViewer.getExpandedElements(); job.runInUIThread(monitor); Object[] expandedAfter = fCheckboxTreeViewer.getExpandedElements(); ArrayList<Object> list = new ArrayList<>(); for (int i = 0; i < expandedBefore.length; i++) { list.add(expandedBefore[i]); } for (int i = 0; i < expandedAfter.length; i++) { if (!list.contains(expandedAfter[i])) { list.add(expandedAfter[i]); } } fCheckboxTreeViewer.setCheckedElements(getCheckedElements()); fCheckboxTreeViewer.setExpandedElements(list.toArray()); return Status.OK_STATUS; } }; }</code><technical_language>In TriStateFilteredCheckboxTree, calls StructuredViewer.testFindItem(). do find items if parent expanded. FilteredCheckboxTree.fCheckedObjects out of sync tree</technical_language>

Target:
protected WorkbenchJob doCreateRefreshJob() { WorkbenchJob job = super.doCreateRefreshJob(); return new WorkbenchJob("Refresh Filter") { @Override public IStatus runInUIThread(IProgressMonitor monitor) { if (fCheckboxTreeViewer.getTree().isDisposed()) { return Status.CANCEL_STATUS; } Set<Object> expandedElements = new HashSet<>(Arrays.asList(fCheckboxTreeViewer.getExpandedElements())); job.runInUIThread(monitor); expandedElements.addAll(Arrays.asList(fCheckboxTreeViewer.getExpandedElements())); fCheckboxTreeViewer.getTree().setRedraw(false); fCheckboxTreeViewer.expandAll(); fCheckboxTreeViewer.setCheckedElements(getCheckedElements()); fCheckboxTreeViewer.collapseAll(); fCheckboxTreeViewer.getTree().setRedraw(true); fCheckboxTreeViewer.setExpandedElements(expandedElements.toArray()); return Status.OK_STATUS; } }; }
Source:
<code>private void createNewStepContext() { <START> stepContext = new ClassPathXmlApplicationContext(new String[]{"classpath*:cucumber-steps.xml"}, <END> applicationContext); }</code><technical_language>rename this cucumber-glue.xml instead please</technical_language>

Target:
private void createNewStepContext() { stepContext = new ClassPathXmlApplicationContext(new String[]{"classpath*:cucumber-glue.xml"}, applicationContext); }
Source:
<code>private Schema getOutputSchema() { InputStream inputStream = null; ExternalRecord externalRecord = null; List<Schema.Field> fields = Lists.newArrayList(); try { inputStream = IOUtils.toInputStream(config.copybookContents, "UTF-8"); BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream); externalRecord = CopybookIOUtils.getExternalRecord(bufferedInputStream); String fieldName; for (ExternalField field : externalRecord.getRecordFields()) { fieldName = field.getName(); <START> if ((fieldsToDrop.size() > 0 && !fieldsToDrop.contains(fieldName)) || fieldsToDrop.size() == 0) { <END> fields.add(Schema.Field.of(field.getName(), Schema.nullableOf(Schema.of(getFieldSchemaType(field.getType()))))); } } return Schema.recordOf("record", fields); } catch (IOException e) { throw new IllegalArgumentException("Exception while creating input stream for COBOL Copybook. Invalid output " + "schema: " + e.getMessage(), e); } catch (RecordException e) { throw new IllegalArgumentException("Exception while creating record from COBOL Copybook. Invalid output " + "schema: " + e.getMessage(), e); } }</code><technical_language>simplified if (fieldsToDrop.size() == 0 || !fieldsToDrop.contains(fieldName))</technical_language>

Target:
private Schema getOutputSchema() { InputStream inputStream = null; ExternalRecord externalRecord = null; List<Schema.Field> fields = Lists.newArrayList(); try { inputStream = IOUtils.toInputStream(config.copybookContents, "UTF-8"); BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream); externalRecord = CopybookIOUtils.getExternalRecord(bufferedInputStream); String fieldName; for (ExternalField field : externalRecord.getRecordFields()) { fieldName = field.getName(); if (fieldsToDrop.contains(fieldName)) { continue; } fields.add(Schema.Field.of(field.getName(), Schema.nullableOf(Schema.of(getFieldSchemaType(field.getType()))))); } return Schema.recordOf("record", fields); } catch (IOException e) { throw new IllegalArgumentException("Exception while creating input stream for COBOL Copybook. Invalid output " + "schema: " + e.getMessage(), e); } catch (RecordException e) { throw new IllegalArgumentException("Exception while creating record from COBOL Copybook. Invalid output " + "schema: " + e.getMessage(), e); } }
Source:
<code>private boolean <START> isFixedSize(Size <END> regionsContainerSize, boolean isVertical) { boolean result = regionsContainerSize.getWidth() != -1 && regionsContainerSize.getHeight() != -1; if (!result && (regionsContainerSize.getWidth() != -1 || regionsContainerSize.getHeight() != -1)) { EObject element = regionContainer.getElement(); if (element instanceof DNodeContainer) { DNodeContainer dnc = (DNodeContainer) element; if (isVertical && regionsContainerSize.getHeight() != -1) { result = regionsContainerSize.getHeight() == dnc.getHeight(); } else if (!isVertical && regionsContainerSize.getWidth() != -1) { result = regionsContainerSize.getWidth() == dnc.getWidth(); } } } return result; }</code><technical_language>name reflect test if RC a fixed size</technical_language>

Target:
private boolean isFixedSize(Size regionsContainerSize, boolean isVertical) { boolean result = regionsContainerSize.getWidth() != -1 && regionsContainerSize.getHeight() != -1; if (!result && (regionsContainerSize.getWidth() != -1 || regionsContainerSize.getHeight() != -1)) { EObject element = regionsContainer.getElement(); if (element instanceof DNodeContainer) { DNodeContainer dnc = (DNodeContainer) element; if (isVertical && regionsContainerSize.getHeight() != -1) { result = regionsContainerSize.getHeight() == dnc.getHeight(); } else if (!isVertical && regionsContainerSize.getWidth() != -1) { result = regionsContainerSize.getWidth() == dnc.getWidth(); } } } return result; }
Source:
<code>private List<Map<String,String>> findAllLangContentlets(final String contentletIdentifier){ return conAPI.findAllLangContentlets(contentletIdentifier).stream().map(contentlet -> { <START> final Map <String,String> map = new HashMap<>(); <END> map.put("inode",contentlet.getInode()); map.put("languageId",contentlet.getLanguageId()+""); return map; }).collect(CollectionsUtils.toImmutableList()); }</code><technical_language>return CollectionUtils.map("inode",contentlet.getInode(),"languageId",contentlet.getLanguageId()+"");</technical_language>

Target:
private List<Map<String,String>> findAllLangContentlets(final String contentletIdentifier){ return conAPI.findAllLangContentlets(contentletIdentifier).stream().map(contentlet -> { return map("inode",contentlet.getInode(), "languageId",contentlet.getLanguageId()+""); }).collect(toImmutableList()); }
Source:
<code>private void unpack(File outputFile) throws NoSuchArchiverException { UnArchiver unarchiver = this.archiverManager.getUnArchiver(outputFile); unarchiver.setSourceFile(outputFile); <START> if (unarchiver instanceof GZipUnArchiver) { <END> unarchiver.setDestFile(new File(this.outputDirectory, this.outputFileName.replaceFirst("(.+)\\.gz(?:ip)?$", "$1"))); } else { unarchiver.setDestDirectory(this.outputDirectory); } unarchiver.extract(); outputFile.delete(); }</code><technical_language>I remove condition set destFile destDirectory. I implementation of unarchivers, of pick a directory file (depending able compress), both. This enable BZip, XZ more (which currently issue GZip)</technical_language>

Target:
private void unpack(File outputFile) throws NoSuchArchiverException { UnArchiver unarchiver = this.archiverManager.getUnArchiver(outputFile); unarchiver.setSourceFile(outputFile); if (isFileUnArchiver(unarchiver)) { unarchiver.setDestFile(new File(this.outputDirectory, outputFileName.substring(0, outputFileName.lastIndexOf('.')))); } else { unarchiver.setDestDirectory(this.outputDirectory); } unarchiver.extract(); outputFile.delete(); }
Source:
<code>public void testStacktraceTrimmingListCtor() throws Throwable { List<Map<String, Object>> elements = new ArrayList<>(); for (int k = 0; k < 1000; k++) { elements.add(Collections.singletonMap("Foo", new Object())); } Stacktrace stacktrace = new Stacktrace(elements); JSONArray jsonArray = streamableToJsonArray(stacktrace); assertEquals(200, jsonArray.length()); <START> } <END></code><technical_language>This test assert correct values truncated. test object a differentiate ordered frame assert "top" 200 frames included</technical_language>

Target:
public void testStacktraceTrimmingListCtor() throws Throwable { List<Map<String, Object>> elements = new ArrayList<>(); for (int k = 0; k < 1000; k++) { elements.add(Collections.singletonMap("Foo", (Object) k)); } Stacktrace stacktrace = new Stacktrace(elements); JSONArray jsonArray = streamableToJsonArray(stacktrace); assertEquals(200, jsonArray.length()); assertEquals(0, jsonArray.getJSONObject(0).getInt("Foo")); assertEquals(199, jsonArray.getJSONObject(199).getInt("Foo")); }
Source:
<code>void setupHistoryMonitoring(RemoteConnector remoteConnector, IPreferenceStore preferenceStore) throws IOException { MachineManager.MachineInfo minfo = null; if ((fRemoteConnection.getRemoteServices().getCapabilities() & IRemoteServices.CAPABILITY_SUPPORTS_COMMAND_SHELL) != 0) { fProcess = fRemoteConnection.getCommandShell(IRemoteProcessBuilder.ALLOCATE_PTY); } else { minfo = MachineManager.initializeMachine(fRemoteConnection); List<String> shellCommand = new ArrayList<String>(); shellCommand.add(minfo.shell); shellCommand.add("-l"); IRemoteProcessBuilder processBuilder = fRemoteConnection.getProcessBuilder(shellCommand); fProcess = processBuilder.start(IRemoteProcessBuilder.ALLOCATE_PTY); } remoteConnector.setInputStream(fProcess.getInputStream()); fControl.setState(TerminalState.CONNECTED); fControl.setTerminalTitle(fRemoteConnection.getName()); final OutputStream outputStream = fProcess.getOutputStream(); remoteConnector.setOutputStream(outputStream); MachineManager.setOutputStream(fRemoteConnection.getAddress(), outputStream); String startup = getDefault( preferenceStore.getString(Messages.SHELL_STARTUP_COMMAND), TerminalPrefs.SHELL_STARTUP_DEFAULT); <START> if(minfo == null) { <END> ; } else if(minfo.isCsh) { startup=startup.replaceFirst("export\\s+(\\w+)=", "setenv $1 "); } else if(minfo.isBash) { startup=startup.replaceFirst("setenv\\s+(\\w+)\\s+","export $1="); } outputStream.write((startup+"\n").getBytes()); outputStream.flush(); }</code><technical_language>Incorrect formatting</technical_language>

Target:
void setupHistoryMonitoring(RemoteConnector remoteConnector, IPreferenceStore preferenceStore) throws IOException { MachineManager.MachineInfo minfo = null; if ((fRemoteConnection.getRemoteServices().getCapabilities() & IRemoteServices.CAPABILITY_SUPPORTS_COMMAND_SHELL) != 0) { fProcess = fRemoteConnection.getCommandShell(IRemoteProcessBuilder.ALLOCATE_PTY); } else { minfo = MachineManager.initializeMachine(fRemoteConnection); List<String> shellCommand = new ArrayList<String>(); shellCommand.add(minfo.shell); shellCommand.add("-l"); IRemoteProcessBuilder processBuilder = fRemoteConnection.getProcessBuilder(shellCommand); fProcess = processBuilder.start(IRemoteProcessBuilder.ALLOCATE_PTY); } remoteConnector.setInputStream(fProcess.getInputStream()); fControl.setState(TerminalState.CONNECTED); fControl.setTerminalTitle(fRemoteConnection.getName()); final OutputStream outputStream = fProcess.getOutputStream(); remoteConnector.setOutputStream(outputStream); MachineManager.setOutputStream(fRemoteConnection.getAddress(), outputStream); String startup = getDefault( preferenceStore.getString(Messages.SHELL_STARTUP_COMMAND), TerminalPrefs.SHELL_STARTUP_DEFAULT); if (minfo != null) { if (minfo.isCsh) { startup = startup.replaceFirst("export\\s+(\\w+)=", "setenv $1 "); } else if (minfo.isBash) { startup = startup.replaceFirst("setenv\\s+(\\w+)\\s+", "export $1="); } } outputStream.write((startup + "\n").getBytes()); outputStream.flush(); }
Source:
<code>private void doRequest(final int id, final Bundle bundle) { switch (id) { case ID_REQUEST_REFRESH_ARTICLE: showLoadingState(bundle.getBoolean(FLAG_SHOW_LOADING, true)); requestQueue.add(fetchRequestForArticleRefresh(bundle)); break; case ID_REQUEST_HOOAH: requestQueue.add(fetchRequestForHooah(bundle)); break; case ID_REQUEST_POST_COMMENT: requestQueue.add(fetchRequestForPostComment(bundle)); break; case ID_REQUEST_COMMENT_UPVOTE: requestQueue.add(fetchRequestForCommentUpvote(bundle)); break; case ID_REQUEST_COMMENT_DOWNVOTE: requestQueue.add(fetchRequestForCommentDownvote(bundle)); break; default: <START> throw new IllegalArgumentException("No request matching " + id); <END> } }</code><technical_language>discussed this, chance of changing this log instead of exception? request is queue harm in login wrong request id</technical_language>

Target:
private void doRequest(final int id, final Bundle bundle) { switch (id) { case ID_REQUEST_REFRESH_ARTICLE: showLoadingState(bundle.getBoolean(FLAG_SHOW_LOADING, true)); requestQueue.add(fetchRequestForArticleRefresh(bundle)); break; case ID_REQUEST_HOOAH: requestQueue.add(fetchRequestForHooah(bundle)); break; case ID_REQUEST_POST_COMMENT: requestQueue.add(fetchRequestForPostComment(bundle)); break; case ID_REQUEST_COMMENT_UPVOTE: requestQueue.add(fetchRequestForCommentUpvote(bundle)); break; case ID_REQUEST_COMMENT_DOWNVOTE: requestQueue.add(fetchRequestForCommentDownvote(bundle)); break; default: Log.w(getClass().getSimpleName(), "No request matching " + id); } }
Source:
<code>public void updateCallback(Map<String, Object> properties) { if (properties != null) { setMonitoredDirectoryPath((String) properties.get("monitoredDirectoryPath")); setProcessingMechanism((String) properties.get("processingMechanism")); setNumThreads((Integer) properties.get("numThreads")); setReadLockIntervalMilliseconds((Integer) properties.get("readLockIntervalMilliseconds")); String[] parameterArray = (String[]) properties.get(Constants.ATTRIBUTE_OVERRIDES_KEY); if (parameterArray != null) { setAttributeOverrides(Arrays.asList(parameterArray)); } <START> destroy(0); <END> init(); } }</code><technical_language>destroy() is async, is a high chance start initializing completed removal. need get a hold of CompletableFuture runAsync() in destroy wait for initiating init()</technical_language>

Target:
public void updateCallback(Map<String, Object> properties) { if (properties != null) { setMonitoredDirectoryPath((String) properties.get("monitoredDirectoryPath")); setProcessingMechanism((String) properties.get("processingMechanism")); setNumThreads((Integer) properties.get("numThreads")); setReadLockIntervalMilliseconds((Integer) properties.get("readLockIntervalMilliseconds")); String[] parameterArray = (String[]) properties.get(Constants.ATTRIBUTE_OVERRIDES_KEY); if (parameterArray != null) { setAttributeOverrides(Arrays.asList(parameterArray)); } CompletableFuture.runAsync( () -> { removeRoutes(); configure(); }, configurationExecutor); } }
Source:
<code>public WorldRendererImpl(Context context, GLBufferPool bufferPool) { this.context = context; this.worldProvider = context.get(WorldProvider.class); this.backdropProvider = context.get(BackdropProvider.class); this.renderingConfig = context.get(Config.class).getRendering(); this.renderingDebugConfig = renderingConfig.getDebug(); this.shaderManager = context.get(ShaderManager.class); if (renderingConfig.isVrSupport()) { this.vrProvider = new OpenVRProvider(); if (this.vrProvider.init()) { playerCamera = new OpenVRStereoCamera(this.vrProvider); currentRenderingStage = RenderingStage.LEFT_EYE; context.put(OpenVRProvider.class, vrProvider); } <START> else { <END> playerCamera = new PerspectiveCamera(renderingConfig.getCameraSettings()); currentRenderingStage = RenderingStage.MONO; } } else { playerCamera = new PerspectiveCamera(renderingConfig.getCameraSettings()); currentRenderingStage = RenderingStage.MONO; } LocalPlayerSystem localPlayerSystem = context.get(LocalPlayerSystem.class); localPlayerSystem.setPlayerCamera(playerCamera); renderableWorld = new RenderableWorldImpl(worldProvider, context.get(ChunkProvider.class), bufferPool, playerCamera); renderQueues = renderableWorld.getRenderQueues(); initRenderingSupport(); }</code><technical_language>So, do expect application crash in circumstances</technical_language>

Target:
public WorldRendererImpl(Context context, GLBufferPool bufferPool) { this.context = context; this.worldProvider = context.get(WorldProvider.class); this.backdropProvider = context.get(BackdropProvider.class); this.renderingConfig = context.get(Config.class).getRendering(); this.renderingDebugConfig = renderingConfig.getDebug(); this.shaderManager = context.get(ShaderManager.class); if (renderingConfig.isVrSupport()) { this.vrProvider = new OpenVRProvider(); context.put(OpenVRProvider.class, vrProvider); if (this.vrProvider.init()) { playerCamera = new OpenVRStereoCamera(this.vrProvider); currentRenderingStage = RenderingStage.LEFT_EYE; } else { playerCamera = new PerspectiveCamera(renderingConfig.getCameraSettings()); currentRenderingStage = RenderingStage.MONO; } } else { playerCamera = new PerspectiveCamera(renderingConfig.getCameraSettings()); currentRenderingStage = RenderingStage.MONO; } LocalPlayerSystem localPlayerSystem = context.get(LocalPlayerSystem.class); localPlayerSystem.setPlayerCamera(playerCamera); renderableWorld = new RenderableWorldImpl(worldProvider, context.get(ChunkProvider.class), bufferPool, playerCamera); renderQueues = renderableWorld.getRenderQueues(); initRenderingSupport(); }
Source:
<code>public Map<SystemStreamPartition, List<IncomingMessageEnvelope>> poll( Set<SystemStreamPartition> systemStreamPartitions, long timeout) throws InterruptedException { Throwable handlerError = eventHubNonTransientError.get(); if (handlerError != null && clock.currentTimeMillis() - lastRetryTs > config.getMinRetryIntervalMs(systemName)) { int currentRetryCount = retryCountWithinWindow.size(); long maxRetryCount = config.getMaxRetryCount(systemName); if (currentRetryCount < maxRetryCount) { LOG.warn("Received non transient error. Will retry.", handlerError); LOG.info("Current retry count within window: {}. max retry count allowed: {}. window size: ms", currentRetryCount, maxRetryCount, config.getRetryWindowMs(systemName)); long now = clock.currentTimeMillis(); retryCountWithinWindow.update(now); lastRetryTs = now; <START> reconnectTaskStatus = reconnectTaskRunner.submit(this::renewEventHubsClient); <END> } else { LOG.error("Retry exhaustion: reach max retry count allowed ({}) within window ({}ms)", currentRetryCount, config.getRetryWindowMs(systemName)); String msg = "Received a non transient error from event hub partition receiver"; throw new SamzaException(msg, handlerError); } } return super.poll(systemStreamPartitions, timeout); }</code><technical_language>ensure tasks submitted this executor throw exceptions. Often, subsequent invocations of task suppressed exception is thrown</technical_language>

Target:
public Map<SystemStreamPartition, List<IncomingMessageEnvelope>> poll( Set<SystemStreamPartition> systemStreamPartitions, long timeout) throws InterruptedException { Throwable handlerError = eventHubNonTransientError.get(); if (handlerError != null && clock.currentTimeMillis() - lastRetryTs > config.getMinRetryIntervalMs(systemName)) { int currentRetryCount = recentRetryAttempts.size(); long maxRetryCount = config.getMaxRetryCount(systemName); if (currentRetryCount < maxRetryCount) { LOG.warn("Received non transient error. Will retry.", handlerError); LOG.info("Current retry count within window: {}. max retry count allowed: {}. window size: ms", currentRetryCount, maxRetryCount, config.getRetryWindowMs(systemName)); long now = clock.currentTimeMillis(); recentRetryAttempts.update(now); lastRetryTs = now; reconnectTaskStatus = reconnectTaskRunner.submit(this::renewEventHubsClient); } else { LOG.error("Retries exhausted. Reached max allowed retries: ({}) within window ms", currentRetryCount, config.getRetryWindowMs(systemName)); String msg = "Received a non transient error from event hub partition receiver"; throw new SamzaException(msg, handlerError); } } return super.poll(systemStreamPartitions, timeout); }
Source:
<code>public List<SqlNode> operands() { if (hasAssignment() && !(call.getOperator() instanceof SqlUnresolvedFunction)) { return permutedOperands(call); } else { final List<SqlNode> operandList = call.getOperandList(); final SqlOperandTypeChecker checker = call.getOperator().getOperandTypeChecker(); if (checker == null) { return operandList; } final SqlOperandCountRange range = checker.getOperandCountRange(); final List<SqlNode> list = Lists.newArrayList(operandList); final SqlCall defaultCall = createDefaultCall(); while (list.size() < range.getMax() && checker.isOptional(list.size()) && checker.isFixedParameters()) { <START> list.add(defaultCall); <END> } return list; } }</code><technical_language>Suggest create defaultCall loop. calls do need default arguments. in-line defaultCall method, simple</technical_language>

Target:
public List<SqlNode> operands() { if (hasAssignment() && !(call.getOperator() instanceof SqlUnresolvedFunction)) { return permutedOperands(call); } else { final List<SqlNode> operandList = call.getOperandList(); final SqlOperandTypeChecker checker = call.getOperator().getOperandTypeChecker(); if (checker == null) { return operandList; } final SqlOperandCountRange range = checker.getOperandCountRange(); final List<SqlNode> list = Lists.newArrayList(operandList); while (list.size() < range.getMax() && checker.isOptional(list.size()) && checker.isFixedParameters()) { list.add(DefaultCallHolder.DEFAULT_CALL); } return list; } }
Source:
<code>public void stop() { <START> CONNECTION_MANAGER_TIMER.purge(); <END> }</code><technical_language>change this purge</technical_language>

Target:
public void stop() { CONNECTION_MANAGER_TIMER.cancel(); }
Source:
<code>protected void tearDown() throws Exception { SessionUIManager.INSTANCE.getUISession(session).closeEditors(false, Collections.singleton((DialectEditor) editorPart)); <START> DialectUIManager.INSTANCE.closeEditor(editorPart, false); <END> TestsUtil.emptyEventsFromUIThread(); super.tearDown(); }</code><technical_language>This closeEditor is needed. (But in some ways, code is simpler prefer DUIM.closeEditor remove SUIM.INSTANCE.getUISession.closeEditors instruction)</technical_language>

Target:
protected void tearDown() throws Exception { DialectUIManager.INSTANCE.closeEditor(editorPart, false); TestsUtil.emptyEventsFromUIThread(); super.tearDown(); }
Source:
<code>private void logUpdatedEntityIds(Set<String> entityIds) { <START> entityIds.forEach(UPDATED_ENTITY_IDS_LOG::info); <END> }</code><technical_language>nit: unrelated in general dedicated patches for cleanups, clearer digging git history</technical_language>

Target:
private void logUpdatedEntityIds(Set<String> entityIds) { entityIds.forEach(entityId -> UPDATED_ENTITY_IDS_LOG.info(entityId)); }
Source:
<code>String resolveTemplatePath(final Context context, final Writer writer, final RenderParams params, final String argument) { if (argument.contains("/")) { <START> <END> }else{ return (params.live) ? "/live/" + argument + "." + EXTENSION : "/working/" + argument + "." + EXTENSION; } }</code><technical_language>@wezell , missing return statement... This is breaking compiling code</technical_language>

Target:
String resolveTemplatePath(final Context context, final Writer writer, final RenderParams params, final String argument) { return (params.live) ? "/live/" + argument + "." + EXTENSION : "/working/" + argument + "." + EXTENSION; }
Source:
<code>private Runnable failPendingRequests() { return () -> { if (!pendingRequests.isEmpty()) { final NoResourceAvailableException cause = new NoResourceAvailableException("Could not acquire the minimum required resources."); cancelPendingRequests( cause, <START> request -> !isBatchSlotRequestTimeoutCheckDisabled || !request.isBatchRequest); <END> } }; }</code><technical_language>suggestion request -> !isBatchSlotRequestTimeoutCheckDisabled || !request.isBatchRequest());</technical_language>

Target:
private void failPendingRequests() { if (!pendingRequests.isEmpty()) { final NoResourceAvailableException cause = new NoResourceAvailableException("Could not acquire the minimum required resources."); cancelPendingRequests( request -> !isBatchSlotRequestTimeoutCheckDisabled || !request.isBatchRequest(), cause ); } }
Source:
<code>private void launchFilePicker() { <START> startActivityForResult(BoxBrowseFileActivity.getLaunchIntent(this, BoxFolder.createFromIdAndName("0", "All Files"), session), REQUEST_CODE_FILE_PICKER); <END> }</code><technical_language>Move constant</technical_language>

Target:
private void launchFilePicker() { startActivityForResult(BoxBrowseFileActivity.getLaunchIntent(this, BoxFolder.createFromIdAndName(ROOT_FOLDER_ID, ROOT_FOLDER_NAME), session), REQUEST_CODE_FILE_PICKER); }
Source:
<code><START> @Nullable public HttpRequest request() { <END> return null; }</code><technical_language>Ah yeah sense</technical_language>

Target:
@Override @Nullable public HttpRequest request() { return null; }
Source:
<code>private void assertTwoMessages(String fileName, List<String> expectedMessages) throws Exception { File sourceFile = new File(baseDir, fileName); LocalizedMessages messages = processFile(sourceFile, check); assertThat(messages, is(not(nullValue()))); <START> assertThat(messages.getMessages().isEmpty(), is(false)); <END> assertThat(messages.getMessages().size(), is(2)); List<String> receivedMessages = new ArrayList<>(); for (LocalizedMessage message : messages.getMessages()) { receivedMessages.add(message.getMessage()); } assertThat(receivedMessages, containsInAnyOrder(expectedMessages.toArray())); }</code><technical_language>Redundant next assertion</technical_language>

Target:
private void assertTwoMessages(String fileName, List<String> expectedMessages) throws Exception { File sourceFile = new File(baseDir, fileName); LocalizedMessages messages = processFile(sourceFile, check); assertThat(messages.getMessages().isEmpty(), is(false)); assertThat(messages.getMessages().size(), is(2)); List<String> receivedMessages = new ArrayList<>(); for (LocalizedMessage message : messages.getMessages()) { receivedMessages.add(message.getMessage()); } assertThat(receivedMessages, containsInAnyOrder(expectedMessages.toArray())); }
Source:
<code>public void provideDynamicMetrics(MetricDescriptor descriptor, MetricsCollectionContext context) { for (ManagedExecutorService executorService : executors.values()) { MetricDescriptor executorDescriptor = descriptor .copy() .withPrefix("internal-executor") .withDiscriminator("executor", executorService.getName()) .withExcludedTarget(MANAGEMENT_CENTER); context.collect(executorDescriptor, executorService); } for (ManagedExecutorService executorService : durableExecutors.values()) { MetricDescriptor executorDescriptor = descriptor .copy() .withPrefix("durable-executor") .withDiscriminator("executor", executorService.getName()) <START> .withExcludedTarget(MANAGEMENT_CENTER); <END> context.collect(executorDescriptor, executorService); } for (ManagedExecutorService executorService : scheduleDurableExecutors.values()) { MetricDescriptor executorDescriptor = descriptor .copy() .withPrefix("scheduled-durable-executor") .withDiscriminator("executor", executorService.getName()) .withExcludedTarget(MANAGEMENT_CENTER); context.collect(executorDescriptor, executorService); } }</code><technical_language>I metrics for durable scheduled durable executors for MC, decide implement support for user defined executors in MC in future. Also, agreed, fine remove internal- metrics, in MC UI meant for diagnostics</technical_language>

Target:
public void provideDynamicMetrics(MetricDescriptor descriptor, MetricsCollectionContext context) { for (ManagedExecutorService executorService : executors.values()) { MetricDescriptor executorDescriptor = descriptor .copy() .withPrefix("executor.internal") .withDiscriminator("name", executorService.getName()) .withExcludedTarget(MANAGEMENT_CENTER); context.collect(executorDescriptor, executorService); } for (ManagedExecutorService executorService : durableExecutors.values()) { MetricDescriptor executorDescriptor = descriptor .copy() .withPrefix("executor.durable.internal") .withDiscriminator("name", executorService.getName()) .withExcludedTarget(MANAGEMENT_CENTER); context.collect(executorDescriptor, executorService); } for (ManagedExecutorService executorService : scheduleDurableExecutors.values()) { MetricDescriptor executorDescriptor = descriptor .copy() .withPrefix("executor.scheduled.internal") .withDiscriminator("name", executorService.getName()) .withExcludedTarget(MANAGEMENT_CENTER); context.collect(executorDescriptor, executorService); } }
Source:
<code>public ModelAndView getLoanDetail() { String loginName = LoginUserInfo.getLoginName(); ExperienceLoanDto experienceLoanDto = experienceLoanDetailService.findExperienceLoanDtoDetail(1, LoginUserInfo.getLoginName()); ModelAndView modelAndView = new ModelAndView("/experience-loan", "responsive", true); modelAndView.addObject("loan", experienceLoanDto); long expectedInterest = investService.estimateInvestIncome(experienceLoanDto.getId(), loginName, 1000000L, new Date()); modelAndView.addObject("interestPerTenThousands", String.valueOf(expectedInterest)); <START> modelAndView.addObject("verifyTime", new DateTime().withTimeAtStartOfDay().toString("yyyy-MM-dd HH:mm:ss")); <END> modelAndView.addObject("interestPointName", experienceLoanDto.getLoanType().getInterestPointName()); modelAndView.addObject("experienceBalance", userService.getExperienceBalanceByLoginName(LoginUserInfo.getLoginName())); modelAndView.addObject("isAccount", accountService.findByLoginName(LoginUserInfo.getLoginName()) == null ? "false" : "true"); return modelAndView; }</code><technical_language>template</technical_language>

Target:
public ModelAndView getLoanDetail() { ExperienceLoanDto experienceLoanDto = experienceLoanDetailService.findExperienceLoanDtoDetail(1, LoginUserInfo.getLoginName()); ModelAndView modelAndView = new ModelAndView("/experience-loan", "responsive", true); modelAndView.addObject("loan", experienceLoanDto); modelAndView.addObject("experienceBalance", userService.getExperienceBalanceByLoginName(LoginUserInfo.getLoginName())); modelAndView.addObject("isAccount", accountService.findByLoginName(LoginUserInfo.getLoginName()) == null ? "false" : "true"); return modelAndView; }
Source:
<code><START> public Contact(String start_first_name, String start_last_name, String start_phone_number, String start_second_phone) { <END> if (start_first_name == null){ start_first_name = ""; } if (start_last_name == null){ start_last_name = ""; } if (start_phone_number == null){ start_phone_number = ""; } if (start_second_phone == null){ start_second_phone = ""; } first_name = start_first_name; last_name = start_last_name; phone_number = start_phone_number; second_phone = start_second_phone; }</code><technical_language>I thought allow null args for lastName secondPhone? able construct a firstName phoneNumber null -- I throwing a RuntimeException() in if statements instead of changing ""</technical_language>

Target:
public Contact(String start_first_name, String start_last_name, String start_phone_number, String start_second_phone) { if (start_first_name == null || start_first_name.equals("")){ throw new IllegalArgumentException(); } if (start_last_name == null){ start_last_name = ""; } if (start_phone_number == null || start_phone_number.length() < 3){ throw new IllegalArgumentException(); } if (start_second_phone == null){ start_second_phone = ""; } first_name = start_first_name; last_name = start_last_name; phone_number = start_phone_number; second_phone = start_second_phone; }
Source:
<code>public BaseTestMethod clone() { TestNGMethod clone = new TestNGMethod( getConstructorOrMethod().getMethod(), getAnnotationFinder(), false, getXmlTest(), getInstance()); ITestClass tc = getTestClass(); NoOpTestClass testClass = new NoOpTestClass(tc); testClass.setBeforeTestMethods(clone(tc.getBeforeTestMethods())); testClass.setAfterTestMethod(clone(tc.getAfterTestMethods())); clone.m_testClass = testClass; clone.setDate(getDate()); clone.setGroups(getGroups()); clone.setGroupsDependedUpon(getGroupsDependedUpon(), Collections.emptyList()); clone.setMethodsDependedUpon(getMethodsDependedUpon()); clone.setAlwaysRun(isAlwaysRun()); clone.m_beforeGroups = getBeforeGroups(); clone.m_afterGroups = getAfterGroups(); clone.m_currentInvocationCount = m_currentInvocationCount; clone.setMissingGroup(getMissingGroup()); clone.setThreadPoolSize(getThreadPoolSize()); clone.setDescription(getDescription()); clone.setEnabled(getEnabled()); clone.setParameterInvocationCount(getParameterInvocationCount()); clone.setInvocationCount(getInvocationCount()); clone.m_successPercentage = getSuccessPercentage(); clone.setTimeOut(getTimeOut()); <START> clone.setRetryAnalyzer(getRetryAnalyzer(null)); <END> clone.setSkipFailedInvocations(skipFailedInvocations()); clone.setInvocationNumbers(getInvocationNumbers()); clone.setPriority(getPriority()); return clone; }</code><technical_language>is weird here: null is logic symmetry is lost. need a setRetryAnalyzerClass getRetryAnalyzerClass</technical_language>

Target:
public BaseTestMethod clone() { TestNGMethod clone = new TestNGMethod( getConstructorOrMethod().getMethod(), getAnnotationFinder(), false, getXmlTest(), getInstance()); ITestClass tc = getTestClass(); NoOpTestClass testClass = new NoOpTestClass(tc); testClass.setBeforeTestMethods(clone(tc.getBeforeTestMethods())); testClass.setAfterTestMethod(clone(tc.getAfterTestMethods())); clone.m_testClass = testClass; clone.setDate(getDate()); clone.setGroups(getGroups()); clone.setGroupsDependedUpon(getGroupsDependedUpon(), Collections.emptyList()); clone.setMethodsDependedUpon(getMethodsDependedUpon()); clone.setAlwaysRun(isAlwaysRun()); clone.m_beforeGroups = getBeforeGroups(); clone.m_afterGroups = getAfterGroups(); clone.m_currentInvocationCount = m_currentInvocationCount; clone.setMissingGroup(getMissingGroup()); clone.setThreadPoolSize(getThreadPoolSize()); clone.setDescription(getDescription()); clone.setEnabled(getEnabled()); clone.setParameterInvocationCount(getParameterInvocationCount()); clone.setInvocationCount(getInvocationCount()); clone.m_successPercentage = getSuccessPercentage(); clone.setTimeOut(getTimeOut()); clone.setRetryAnalyzer(getRetryAnalyzer()); clone.setRetryAnalyzerClass(getRetryAnalyzerClass()); clone.setSkipFailedInvocations(skipFailedInvocations()); clone.setInvocationNumbers(getInvocationNumbers()); clone.setPriority(getPriority()); return clone; }
Source:
<code>public static int getTotalPageNumber(long totalResults, int pageSize) { <START> return (int)(totalResults/pageSize); <END> }</code><technical_language>returned long</technical_language>

Target:
public static long getTotalPageNumber(long totalResults, int pageSize) { return totalResults/pageSize; }