auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Single<Integer> processMetadata(String path) throws IOException { Metadata readMetadata = null; try { readMetadata = ImageMetadataReader.readMetadata(new File(path)); } catch (ImageProcessingException e) { <START> e.printStackTrace(); <END> } catch (IOException e) { e.printStackTrace(); } if (readMetadata != null) { for (Directory directory : readMetadata.getDirectories()) { if (directory.getName().equals("Exif IFD0") || directory.getName().equals("Exif SubIFD") || directory.getName().equals("Exif Thumbnail")) { Timber.d(directory.getName() + " Contains metadata"); return Single.just(ImageUtils.IMAGE_OK); } } } return Single.just(ImageUtils.FILE_NO_EXIF); }</code><technical_language>logging error logcat? <LINK_0></technical_language>

Target:
public Single<Integer> processMetadata(String path) { Metadata readMetadata = null; try { readMetadata = ImageMetadataReader.readMetadata(new File(path)); } catch (ImageProcessingException e) { Timber.d(e.toString()); } catch (IOException e) { Timber.d(e.toString()); } if (readMetadata != null) { for (Directory directory : readMetadata.getDirectories()) { if (directory.getName().equals("Exif IFD0") || directory.getName().equals("Exif SubIFD") || directory.getName().equals("Exif Thumbnail")) { Timber.d(directory.getName() + " Contains metadata"); return Single.just(ImageUtils.IMAGE_OK); } } } return Single.just(ImageUtils.FILE_NO_EXIF); }
Source:
<code>@Test public void archiveBigFile() throws Exception { assumeTrue(!Functions.isWindows()); <START> long largeFileSize = 10000000000l; <END> File tempFile = File.createTempFile("JENKINS-10629", ".log"); RandomAccessFile file = new RandomAccessFile(tempFile, "rw"); File tarFile = new File(tempFile.getParent(), "JENKINS-10629.tar"); tarFile.deleteOnExit(); tempFile.deleteOnExit(); file.setLength(largeFileSize); assumeTrue(largeFileSize == file.length()); int tar = new FilePath(tempFile.getParentFile()).tar(new FileOutputStream(tarFile), tempFile.getName()); assertEquals("One tar file should have been compressed", 1, tar); }</code><technical_language>is this 10000000000l 100000000001? upper case 'L' a case 'L' for Longs variable names</technical_language>

Target:
@Test public void archiveBigFile() throws Exception { final long largeFileSize = 9000000000L; final String filePrefix = "JENKINS-10629"; checkTarUntarRoundTrip(filePrefix, largeFileSize); }
Source:
<code>private static boolean isValidChallenge(String authenticateHeader, String authChallengePrefix) { <START> if (authenticateHeader != null && !authenticateHeader.isEmpty() <END> && authenticateHeader.toLowerCase().startsWith(authChallengePrefix.toLowerCase())) { return true; } return false; }</code><technical_language>return if case? Basically if (true) return true</technical_language>

Target:
private static boolean isValidChallenge(String authenticateHeader, String authChallengePrefix) { return (!ImplUtils.isNullOrEmpty(authenticateHeader) && authenticateHeader.toLowerCase(Locale.ROOT).startsWith(authChallengePrefix.toLowerCase(Locale.ROOT))); }
Source:
<code>private void testGetStudentProfile() throws Exception { StudentAttributes student1InCourse1 = dataBundle.students.get("student1InCourse1"); AccountAttributes student1 = dataBundle.accounts.get("student1InCourse1"); ______TS("success: default profile"); StudentProfileAttributes actualSpa = studentsLogic.getStudentProfile(student1InCourse1.googleId); StudentProfileAttributes expectedSpa = student1.studentProfile; expectedSpa.institute = actualSpa.institute; expectedSpa.modifiedDate = actualSpa.modifiedDate; <START> expectedSpa.gender = actualSpa.gender; <END> assertEquals(expectedSpa.toString(), actualSpa.toString()); ______TS("success: edited profile"); StudentProfileAttributes expectedStudentProfile = StudentProfileAttributes.builder().build(); expectedStudentProfile.googleId = student1.googleId; expectedStudentProfile.shortName = "short"; expectedStudentProfile.email = "personal@email.tmt"; expectedStudentProfile.institute = "institute"; expectedStudentProfile.nationality = "Angolan"; expectedStudentProfile.gender = Gender.FEMALE; expectedStudentProfile.moreInfo = "This sentence may sound sound but it cannot make actual sound... :P"; student1.studentProfile = expectedStudentProfile; accountsLogic.updateAccount(student1, true); StudentProfileAttributes actualStudentProfile = studentsLogic.getStudentProfile(student1InCourse1.googleId); expectedStudentProfile.modifiedDate = actualStudentProfile.modifiedDate; assertEquals(expectedStudentProfile.toString(), actualStudentProfile.toString()); }</code><technical_language>is this necessary</technical_language>

Target:
private void testGetStudentProfile() throws Exception { StudentAttributes student1InCourse1 = dataBundle.students.get("student1InCourse1"); AccountAttributes student1 = dataBundle.accounts.get("student1InCourse1"); ______TS("success: default profile"); StudentProfileAttributes actualSpa = studentsLogic.getStudentProfile(student1InCourse1.googleId); StudentProfileAttributes expectedSpa = student1.studentProfile; expectedSpa.institute = actualSpa.institute; expectedSpa.modifiedDate = actualSpa.modifiedDate; assertEquals(expectedSpa.toString(), actualSpa.toString()); ______TS("success: edited profile"); StudentProfileAttributes expectedStudentProfile = StudentProfileAttributes.builder(student1.googleId).build(); expectedStudentProfile.shortName = "short"; expectedStudentProfile.email = "personal@email.tmt"; expectedStudentProfile.institute = "institute"; expectedStudentProfile.nationality = "Angolan"; expectedStudentProfile.gender = Gender.FEMALE; expectedStudentProfile.moreInfo = "This sentence may sound sound but it cannot make actual sound... :P"; student1.studentProfile = expectedStudentProfile; accountsLogic.updateAccount(student1, true); StudentProfileAttributes actualStudentProfile = studentsLogic.getStudentProfile(student1InCourse1.googleId); expectedStudentProfile.modifiedDate = actualStudentProfile.modifiedDate; assertEquals(expectedStudentProfile.toString(), actualStudentProfile.toString()); }
Source:
<code><START> private String parseFunctionClose() throws ParseException { <END> int index = nextNonBlank(); if (index < 0 || expression.charAt(index) != ')') { throw new ParseException(errorMessage(FUNCTION_CALL_NOT_CLOSED_PROPERLY_ERROR, functionName), parseIndex); } setParseIndex(index + 1); return ")"; }</code><technical_language>Return of method is used</technical_language>

Target:
private void parseFunctionClose() throws ParseException { int index = nextNonBlank(); if (index < 0 || expression.charAt(index) != ')') { throw new ParseException(errorMessage(FUNCTION_CALL_NOT_CLOSED_PROPERLY_ERROR, functionName), parseIndex); } setParseIndex(index + 1); }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ApiDataPoint that = (ApiDataPoint) o; <START> return id.equals(that.id); <END> }</code><technical_language>ha! this is a new construct for me. I thought that.id is a private field ...</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ApiDataPoint that = (ApiDataPoint) o; return id.equals(that.getId()); }
Source:
<code>private static @NonNull Intent helper_basicOSHMSOpenIntent() throws JSONException { return helper_baseHMSOpenIntent() .putExtra( "custom", new JSONObject() {{ put("i", UUID.randomUUID().toString()); }}.toString() <START> ); <END> }</code><technical_language>OSNotificationFormatHelper.PAYLOAD_OS_NOTIFICATION_ID for "i"? OSNotificationFormatHelper.PAYLOAD_OS_ROOT_CUSTOM for "custom"</technical_language>

Target:
private static @NonNull Intent helper_basicOSHMSOpenIntent() throws JSONException { return helper_baseHMSOpenIntent() .putExtra( PAYLOAD_OS_ROOT_CUSTOM, new JSONObject() {{ put(PAYLOAD_OS_NOTIFICATION_ID, UUID.randomUUID().toString()); }}.toString() ); }
Source:
<code>public StreetVertexIndexServiceImpl(Graph graph, boolean hashGrid) { this.graph = graph; if (hashGrid) { edgeTree = new HashGridSpatialIndex<>(); transitStopTree = new HashGridSpatialIndex<>(); verticesTree = new HashGridSpatialIndex<>(); } else { edgeTree = new STRtree(); transitStopTree = new STRtree(); verticesTree = new STRtree(); } postSetup(); if (!hashGrid) { ((STRtree) edgeTree).build(); ((STRtree) transitStopTree).build(); simpleStreetSplitter = new SimpleStreetSplitter( this.graph, null, null, false, <START> new BuilderAnnotationStore( false) <END> ); } else { simpleStreetSplitter = new SimpleStreetSplitter( this.graph, (HashGridSpatialIndex<Edge>) edgeTree, transitStopTree, false, new BuilderAnnotationStore(false) ); } }</code><technical_language>line</technical_language>

Target:
public StreetVertexIndexServiceImpl(Graph graph, boolean hashGrid) { this.graph = graph; if (hashGrid) { edgeTree = new HashGridSpatialIndex<>(); transitStopTree = new HashGridSpatialIndex<>(); verticesTree = new HashGridSpatialIndex<>(); } else { edgeTree = new STRtree(); transitStopTree = new STRtree(); verticesTree = new STRtree(); } postSetup(); if (!hashGrid) { ((STRtree) edgeTree).build(); ((STRtree) transitStopTree).build(); simpleStreetSplitter = new SimpleStreetSplitter( this.graph, null, null, false, new DataImportIssueStore( false) ); } else { simpleStreetSplitter = new SimpleStreetSplitter( this.graph, (HashGridSpatialIndex<Edge>) edgeTree, transitStopTree, false, new DataImportIssueStore(false) ); } }
Source:
<code>public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.login_magic_link_request_screen, container, false); mRequestMagicLinkButton = (Button) view.findViewById(R.id.login_request_magic_link); mRequestMagicLinkButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mLoginListener != null) { <START> if (!NetworkUtils.isNetworkAvailable(getActivity())) { <END> ToastUtils.showToast(getActivity(), R.string.no_network_message, ToastUtils.Duration.LONG); return; } showMagiclinkRequestProgressDialog(); mDispatcher.dispatch(AuthenticationActionBuilder.newSendAuthEmailAction(mEmail)); } } }); view.findViewById(R.id.login_enter_password).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mLoginListener.usePasswordInstead(mEmail); } }); WPNetworkImageView avatarView = (WPNetworkImageView) view.findViewById(R.id.gravatar); avatarView.setImageUrl(GravatarUtils.gravatarFromEmail(mEmail, getContext().getResources() .getDimensionPixelSize(R.dimen.avatar_sz_login)), WPNetworkImageView.ImageType.AVATAR); return view; }</code><technical_language>NetworkUtils.checkConnection(getActivity()) instead</technical_language>

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.login_magic_link_request_screen, container, false); mRequestMagicLinkButton = (Button) view.findViewById(R.id.login_request_magic_link); mRequestMagicLinkButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mLoginListener != null) { if (NetworkUtils.checkConnection(getActivity())) { showMagicLinkRequestProgressDialog(); mDispatcher.dispatch(AuthenticationActionBuilder.newSendAuthEmailAction(mEmail)); } } } }); view.findViewById(R.id.login_enter_password).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mLoginListener != null) { mLoginListener.usePasswordInstead(mEmail); } } }); WPNetworkImageView avatarView = (WPNetworkImageView) view.findViewById(R.id.gravatar); avatarView.setImageUrl(GravatarUtils.gravatarFromEmail(mEmail, getContext().getResources() .getDimensionPixelSize(R.dimen.avatar_sz_login)), WPNetworkImageView.ImageType.AVATAR); return view; }
Source:
<code>public long getContentLength() { <START> return (bytes.length + 2) / 3 * 4; <END> }</code><technical_language>Is + 2 account for floor do integer division</technical_language>

Target:
public long getContentLength() { return divideCeil(bytes.length, 3) * 4; }
Source:
<code>public OnheapIncrementalIndex(IncrementalIndexSchema incrementalIndexSchema, boolean deserializeComplexMetrics, int maxRowCount) { super(incrementalIndexSchema, deserializeComplexMetrics); this.facts = new ConcurrentSkipListMap<>(); this.maxRowCount = maxRowCount; <START> this.aggList = new Aggregator[maxRowCount][]; END> for(int i = 0; i < this.aggList.length; ++i){ this.aggList[i] = null; } }</code><technical_language>I this is overkill memory allocation. revert model in 0.6 a thread safe data structure here</technical_language>

Target:
public OnheapIncrementalIndex( IncrementalIndexSchema incrementalIndexSchema, boolean deserializeComplexMetrics, int maxRowCount ) { super(incrementalIndexSchema, deserializeComplexMetrics); this.maxRowCount = maxRowCount; }
Source:
<code>protected ImmutableValue<ParrotVariant> constructImmutableValue(ParrotVariant value) { <START> return ImmutableSpongeValue.cachedOf(Keys.PARROT_VARIANT, ParrotVariants.RED, value); <END> }</code><technical_language>this.key</technical_language>

Target:
protected ImmutableValue<ParrotVariant> constructImmutableValue(ParrotVariant value) { return ImmutableSpongeValue.cachedOf(this.key, ParrotVariants.RED, value); }
Source:
<code>public QuestionWidget(Context context, FormEntryPrompt p, WidgetChangedListener w){ super(context); if(w!=null){ hasListener = false; widgetChangedListener = w; } this.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { QuestionWidget.this.acceptFocus(); } }); hasListener = (w != null); SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext()); String question_font = settings.getString(PreferencesActivity.KEY_FONT_SIZE, Collect.DEFAULT_FONTSIZE); mQuestionFontsize = new Integer(question_font).intValue(); mAnswerFontsize = mQuestionFontsize + 2; mPrompt = p; setOrientation(LinearLayout.VERTICAL); setGravity(Gravity.TOP); setPadding(0, 7, 0, 0); mLayout = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); mLayout.setMargins(10, 0, 10, 0); addQuestionText(p); addHelpPlaceholder(p); addHintText(p); <START> ACRAUtil.addCustomData(ACRAUtil.LAST_QUESTION_PROMPT, mPrompt.getLongText()); <END> }</code><technical_language>a heads up, question widgets created displayed prompt. activity setting view is know</technical_language>

Target:
public QuestionWidget(Context context, FormEntryPrompt p, WidgetChangedListener w){ super(context); if(w!=null){ hasListener = false; widgetChangedListener = w; } this.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { QuestionWidget.this.acceptFocus(); } }); hasListener = (w != null); SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext()); String question_font = settings.getString(PreferencesActivity.KEY_FONT_SIZE, Collect.DEFAULT_FONTSIZE); mQuestionFontsize = new Integer(question_font).intValue(); mAnswerFontsize = mQuestionFontsize + 2; mPrompt = p; setOrientation(LinearLayout.VERTICAL); setGravity(Gravity.TOP); setPadding(0, 7, 0, 0); mLayout = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); mLayout.setMargins(10, 0, 10, 0); addQuestionText(p); addHelpPlaceholder(p); addHintText(p); }
Source:
<code>private static boolean isPossiblyOkHttpTimeoutBug(Throwable throwable) { if (throwable instanceof SocketTimeoutException) { return true; } Throwable cause = throwable.getCause(); <START> return cause != null && isPossiblyOkHttpTimeoutBug(throwable); <END> }</code><technical_language>I want isPossiblyOkHttpTimeoutBug(cause) SO</technical_language>

Target:
static boolean isPossiblyOkHttpTimeoutBug(Throwable throwable) { if (throwable instanceof SocketTimeoutException) { return true; } Throwable cause = throwable.getCause(); return cause != null && isPossiblyOkHttpTimeoutBug(cause); }
Source:
<code>public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { try { GoogleSignInAccount account = GoogleSignIn.getSignedInAccountFromIntent(data) .getResult(ApiException.class); setResult(createIdpResponse(account)); } catch (ApiException e) { <START> if (e.getStatusCode() == CommonStatusCodes.INVALID_ACCOUNT) { <END> mEmail = null; start(); } else { if (e.getStatusCode() == CommonStatusCodes.DEVELOPER_ERROR) { Log.w(TAG, "Developer error: this application is misconfigured. " + "Check your SHA1 and package name in the Firebase console."); } setResult(IdpResponse.fromError(new FirebaseUiException( ErrorCodes.PROVIDER_ERROR, "Code: " + e.getStatusCode() + ", message: " + e.getMessage()))); } } }</code><technical_language>This a minute understand, add: // If get INVALID_ACCOUNT means pre-set account device, set email null // try launch sign-in again</technical_language>

Target:
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { if (requestCode != RequestCodes.GOOGLE_PROVIDER) { return; } try { GoogleSignInAccount account = GoogleSignIn.getSignedInAccountFromIntent(data) .getResult(ApiException.class); setResult(Resource.forSuccess(createIdpResponse(account))); } catch (ApiException e) { if (e.getStatusCode() == CommonStatusCodes.INVALID_ACCOUNT) { mEmail = null; start(); } else if (e.getStatusCode() == GoogleSignInStatusCodes.SIGN_IN_CURRENTLY_IN_PROGRESS) { start(); } else { if (e.getStatusCode() == CommonStatusCodes.DEVELOPER_ERROR) { Log.w(TAG, "Developer error: this application is misconfigured. " + "Check your SHA1 and package name in the Firebase console."); } setResult(Resource.<IdpResponse>forFailure(new FirebaseUiException( ErrorCodes.PROVIDER_ERROR, "Code: " + e.getStatusCode() + ", message: " + e.getMessage()))); } } }
Source:
<code>public static Block bingTilesAround( @SqlType(StandardTypes.DOUBLE) double latitude, @SqlType(StandardTypes.DOUBLE) double longitude, @SqlType(StandardTypes.INTEGER) long zoomLevel) { checkLatitude(latitude, LATITUDE_OUT_OF_RANGE); checkLongitude(longitude, LONGITUDE_OUT_OF_RANGE); checkZoomLevel(zoomLevel); Set<BingTile> tiles = latitudeLongitudeToSurroundingTiles(latitude, longitude, toIntExact(zoomLevel)); BlockBuilder blockBuilder = BIGINT.createBlockBuilder(null, toIntExact(tiles.size())); <START> tiles.forEach(tile -> { <END> BIGINT.writeLong(blockBuilder, tile.encode()); }); return blockBuilder.build(); }</code><technical_language>tiles.forEach(tile -> BIGINT.writeLong(blockBuilder, tile.encode()));</technical_language>

Target:
public static Block bingTilesAround( @SqlType(StandardTypes.DOUBLE) double latitude, @SqlType(StandardTypes.DOUBLE) double longitude, @SqlType(StandardTypes.INTEGER) long zoomLevel) { checkLatitude(latitude, LATITUDE_OUT_OF_RANGE); checkLongitude(longitude, LONGITUDE_OUT_OF_RANGE); checkZoomLevel(zoomLevel); Set<BingTile> tiles = latitudeLongitudeToSurroundingTiles(latitude, longitude, toIntExact(zoomLevel)); BlockBuilder blockBuilder = BIGINT.createBlockBuilder(null, tiles.size()); tiles.forEach(tile -> BIGINT.writeLong(blockBuilder, tile.encode())); return blockBuilder.build(); }
Source:
<code>protected WorkbenchJob doCreateRefreshJob() { <START> WorkbenchJob job = super.doCreateRefreshJob(); <END> job.addJobChangeListener(new JobChangeAdapter() { @Override public void done(IJobChangeEvent event) { if (fCheckboxTreeViewer.getTree().isDisposed()) { return; } if (fIsExpandAll) { fCheckboxTreeViewer.expandAll(); fCheckboxTreeViewer.setCheckedElements(getCheckedElements()); } else { Object[] elements = fCheckboxTreeViewer.getExpandedElements(); fCheckboxTreeViewer.expandAll(); fCheckboxTreeViewer.setCheckedElements(getCheckedElements()); fCheckboxTreeViewer.collapseAll(); fCheckboxTreeViewer.setExpandedElements(elements); } } }); return job; }</code><technical_language>problem is parent job collapses root filter text empty. I if, instead of actions in a job change listener, instead create a wrapper WorkbenchJob overrides runInUIThread() save checked expanded elements, call super's job's runInUIThread(), restore checked expanded elements</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; } Object[] elements = fCheckboxTreeViewer.getExpandedElements(); job.runInUIThread(monitor); Object[] elements2 = fCheckboxTreeViewer.getExpandedElements(); ArrayList<Object> list = new ArrayList<>(); for (int i = 0; i < elements.length; i++) { list.add(elements[i]); } for (int i = 0; i < elements2.length; i++) { if (!list.contains(elements2[i])) { list.add(elements2[i]); } } fCheckboxTreeViewer.setCheckedElements(getCheckedElements()); fCheckboxTreeViewer.setExpandedElements(list.toArray()); return Status.OK_STATUS; } }; }
Source:
<code>public CatalogInfo(byte[] catalogBytes, byte[] catalogBytesHash, byte[] deploymentBytes) { if (deploymentBytes == null) { throw new IllegalArgumentException("Can't create CatalogContext with null deployment bytes."); } <START> if (catalogBytes != null) { <END> try { m_catalogBytes = catalogBytes; m_jarfile = new InMemoryJarfile(catalogBytes); m_catalogCRC = m_jarfile.getCRC(); } catch (Exception e) { throw new RuntimeException(e); } if (catalogBytesHash != null) { m_catalogHash = catalogBytesHash; } else { m_catalogHash = m_jarfile.getSha1Hash(); } } else { throw new IllegalArgumentException("Can't create CatalogContext with null catalog bytes."); } m_deploymentBytes = deploymentBytes; m_deploymentHash = CatalogUtil.makeDeploymentHash(deploymentBytes); m_deploymentHashForConfig = CatalogUtil.makeDeploymentHashForConfig(deploymentBytes); }</code><technical_language>combine null check for deploymentBytes catalogBytes: if (deploymentBytes == null || catalogBytes ==null)</technical_language>

Target:
public CatalogInfo(byte[] catalogBytes, byte[] catalogBytesHash, byte[] deploymentBytes) { if (deploymentBytes == null) { throw new IllegalArgumentException("Can't create CatalogContext with null deployment bytes."); } if (catalogBytes == null) { throw new IllegalArgumentException("Can't create CatalogContext with null catalog bytes."); } try { m_catalogBytes = catalogBytes; m_jarfile = new InMemoryJarfile(catalogBytes); m_catalogCRC = m_jarfile.getCRC(); } catch (IOException e) { throw new RuntimeException(e); } if (catalogBytesHash == null) { m_catalogHash = m_jarfile.getSha1Hash(); } else { m_catalogHash = catalogBytesHash; } m_deploymentBytes = deploymentBytes; m_deploymentHash = CatalogUtil.makeDeploymentHash(deploymentBytes); m_deploymentHashForConfig = CatalogUtil.makeDeploymentHashForConfig(deploymentBytes); }
Source:
<code>protected String process(IStatus status) { if (status instanceof HsErrPidStatus) { return ((HsErrPidStatus) status).getContent(); } <START> return ""; <END> }</code><technical_language>else for this (or throw IllegalStateException maybe?)</technical_language>

Target:
protected String process(IStatus status) { if (status instanceof HsErrPidStatus) { return ((HsErrPidStatus) status).getContent(); } else { throw new IllegalStateException("Tried to process an incompatible status"); } }
Source:
<code>public double getAttributeAsDouble(String key, double defaultValue) { Object x = getExtendedAttribute(key); if ( x == null ) return defaultValue; if ( x instanceof Double ) return (Double)x; <START> return Double.parseDouble((String)x); END> }</code><technical_language>this parseDoubleAccordingToVcfSpec</technical_language>

Target:
public double getAttributeAsDouble(String key, double defaultValue) { Object x = getExtendedAttribute(key); if ( x == null ) return defaultValue; if ( x instanceof Double ) return (Double)x; return VCFUtils.parseVcfDouble((String) x); }
Source:
<code>public AbstractItemDescriptor(String label, String description, int rank, String id) { super(); <START> Assert.isNotNull(id); <END> if (label != null) { this.label = label; } else { this.label = id; } if (description != null) { this.description = description; } else { this.description = EMPTY_STRING; } this.rank = rank; this.id = id; }</code><technical_language>Preconditions instead of Assert</technical_language>

Target:
public AbstractItemDescriptor(String label, String description, int rank, String id) { super(); Preconditions.checkNotNull(id); if (label != null) { this.label = label; } else { this.label = id; } if (description != null) { this.description = description; } else { this.description = EMPTY_STRING; } this.rank = rank; this.id = id; }
Source:
<code>public synchronized void logged(LogEntry e) { this.entry = e; logs.add(e); <START> notifyAll(); <END> }</code><technical_language>This notify waiters "this", waiters "logs"</technical_language>

Target:
public synchronized void logged(LogEntry e) { if (!testBundleLoc.equals(e.getBundle().getLocation())) { return; } this.entry = e; logs.add(e); notifyAll(); }
Source:
<code>public Map<String, String> responseHeaders() { HttpResponse response = super.getResponse(); Map<String, String> responseHeaders = super.responseHeaders(); StringBuilder sb = new StringBuilder(); CookieStore store = response.getCookieStore(); if(store!=null) { for(Cookie cookie : store.getCookies()) { sb.append(cookie.getName() + "=" + cookie.getValue()); sb.append(";"); } } <START> responseHeaders.put("Set-Cookie", sb.toString()); <END> return responseHeaders; }</code><technical_language>I suggest read cookie store, put a header, if responseHeaders contains Set-Cookie, **and store is null**</technical_language>

Target:
public Map<String, String> responseHeaders() { HttpResponse response = super.getResponse(); Map<String, String> responseHeaders = super.responseHeaders(); StringBuilder sb = new StringBuilder(); CookieStore store = response.getCookieStore(); if(responseHeaders.containsKey("Set-Cookie") && store!=null) { for(Cookie cookie : store.getCookies()) { sb.append(cookie.getName() + "=" + cookie.getValue()); sb.append(";"); } responseHeaders.put("Set-Cookie", sb.toString()); } return responseHeaders; }
Source:
<code>public BoldStylerProvider(Font font) { <START> this.fFont= <END> font; }</code><technical_language>'this' for fields</technical_language>

Target:
public BoldStylerProvider(Font font) { fFont= font; }
Source:
<code>private static String doReplace(JsonObject object, String input) { String result = input; for (Entry<String, JsonElement> entry : object.entrySet()) { String key = entry.getKey(); <START> JsonElement jsonElement = object.get(key); <END> if (jsonElement.isJsonPrimitive()) { String search = "${" + key + "}"; String replace = jsonElement.getAsString(); int index = result.indexOf(search); while (index > -1) { result = result.substring(0, index) + replace + result.substring(index + search.length()); index = result.indexOf(search); } } } return result; }</code><technical_language>This is compute resolution aginst object. Please entry.getValue() instead is accessor</technical_language>

Target:
private static String doReplace(JsonObject object, String input) { String result = input; for (Entry<String, JsonElement> entry : object.entrySet()) { JsonElement jsonElement = entry.getValue(); if (jsonElement.isJsonPrimitive()) { String search = "${" + entry.getKey() + "}"; String replace = jsonElement.getAsString(); int index = result.indexOf(search); while (index > -1) { result = result.substring(0, index) + replace + result.substring(index + search.length()); index = result.indexOf(search); } } } return result; }
Source:
<code>public CassandraRecordSink( CassandraSession cassandraSession, String schemaName, String tableName, List<String> columnNames, List<Type> columnTypes, boolean generateUUID) { this.cassandraSession = requireNonNull(cassandraSession, "cassandraSession"); this.columnTypes = ImmutableList.copyOf(requireNonNull(columnTypes, "columnTypes is null")); this.generateUUID = generateUUID; Insert insert = insertInto(schemaName, tableName); if (generateUUID) { insert.value("id", bindMarker()); } <START> for (String columnName : columnNames) { <END> insert.value(columnName, bindMarker()); } this.insert = cassandraSession.executeWithSession(s -> s.prepare(insert)); values = new ArrayList<>(columnTypes.size() + 1); }</code><technical_language>requireNonNull for schemaName tableName</technical_language>

Target:
public CassandraRecordSink( CassandraSession cassandraSession, String schemaName, String tableName, List<String> columnNames, List<Type> columnTypes, boolean generateUUID) { this.cassandraSession = requireNonNull(cassandraSession, "cassandraSession"); requireNonNull(schemaName, "schemaName is null"); requireNonNull(tableName, "tableName is null"); requireNonNull(columnNames, "columnNames is null"); this.columnTypes = ImmutableList.copyOf(requireNonNull(columnTypes, "columnTypes is null")); this.generateUUID = generateUUID; Insert insert = insertInto(schemaName, tableName); if (generateUUID) { insert.value("id", bindMarker()); } for (int i = 0; i < columnNames.size(); i++) { String columnName = columnNames.get(i); checkArgument(columnName != null, "columnName is null at position: %d", i); insert.value(columnName, bindMarker()); } this.insert = cassandraSession.prepare(insert); values = new ArrayList<>(columnTypes.size() + 1); }
Source:
<code>public byte[] instrument(final InputStream input, final String name) throws IOException { try { <START> return instrument(new ClassReader(input)); <END> } catch (final IOException e) { throw instrumentError(name, e); } }</code><technical_language>If instrumentation fails, exception location information due this usage of instrument(ClassReader) instead of previously instrument(byte[], String). simply preserve readFully</technical_language>

Target:
public byte[] instrument(final InputStream input, final String name) throws IOException { final byte[] bytes; try { bytes = InputStreams.readFully(input); } catch (final IOException e) { throw instrumentError(name, e); } return instrument(bytes, name); }
Source:
<code><START> URI uri(final String path) { <END> return uri(path, Collections.<String, String>emptyMap()); }</code><technical_language>spurious change</technical_language>

Target:
private URI uri(final String path) { return uri(path, Collections.<String, String>emptyMap()); }
Source:
<code>public CapraExcelRow(Row row, File officeFile, DataFormatter formatter) { int rowNum = row.getRowNum(); StringBuilder rowBuilder = new StringBuilder(); rowBuilder.append("Row " + (rowNum + 1) + ": "); boolean firstCellSet = false; for (int j = 0; j < row.getLastCellNum(); j++) { Cell cell = row.getCell(j); String cellValue = formatter.formatCellValue(cell); if (!cellValue.isEmpty()) { if (!firstCellSet) { rowBuilder.append(cellValue); firstCellSet = true; } else { rowBuilder.append(cellDelimiter + cellValue); } } } if (firstCellSet) { Pattern p = Pattern.compile(replaceRegex); Matcher m = p.matcher(rowBuilder); String rowContent = (m.replaceAll(" ")).trim(); <START> String rowUri = CapraOfficeObject.createUri(officeFile.getAbsolutePath(), rowNum); <END> this.setData(rowContent); this.setUri(rowUri); } }</code><technical_language>Hand file do conversion (if needed) in CapraOfficeObject</technical_language>

Target:
public CapraExcelRow(Row row, File officeFile, DataFormatter formatter) { int rowNum = row.getRowNum(); StringBuilder rowBuilder = new StringBuilder(); rowBuilder.append("Row " + (rowNum + 1) + ": "); boolean firstCellSet = false; for (int j = 0; j < row.getLastCellNum(); j++) { Cell cell = row.getCell(j); String cellValue = formatter.formatCellValue(cell); if (!cellValue.isEmpty()) { if (!firstCellSet) { rowBuilder.append(cellValue); firstCellSet = true; } else { rowBuilder.append(cellDelimiter + cellValue); } } } if (firstCellSet) { Pattern p = Pattern.compile(replaceRegex); Matcher m = p.matcher(rowBuilder); String rowContent = (m.replaceAll(" ")).trim(); String rowUri = CapraOfficeObject.createUri(officeFile, rowNum); this.setData(rowContent); this.setUri(rowUri); } }
Source:
<code>public void configure(Requirement<?> requirement) { if (!(requirement instanceof CustomConfiguration<?>)) { throw new IllegalArgumentException("The requirement does not implement " + CustomConfiguration.class); } log.debug("Setting custom configuration to requirement " + requirement.getClass()); @SuppressWarnings("unchecked") CustomConfiguration<Object> customConfiguration = (CustomConfiguration<Object>) requirement; log.debug("Configuration object associated with requirement " + requirement.getClass() + " is " + customConfiguration.getConfigurationClass()); boolean configurationSet = false; for (Object configuration : this.configurations) { <START> try { <END> customConfiguration.setConfiguration(configuration); log.debug("Configuration successfully set"); configurationSet = true; break; } catch (ClassCastException e) { log.error("This configuration (" + configuration + ") cannot be set to " + requirement.toString()); } } if (!configurationSet) { throw new RedDeerConfigurationException("None of the given configurations " + "could have ben set as configuration of the requirement " + requirement.getClass().getName()); } }</code><technical_language>change try-catch isAssignableFrom</technical_language>

Target:
public void configure(Requirement<?> requirement) { if (!(requirement instanceof CustomConfiguration<?>)) { throw new IllegalArgumentException("The requirement does not implement " + CustomConfiguration.class); } log.debug("Setting custom configuration to requirement " + requirement.getClass()); @SuppressWarnings("unchecked") CustomConfiguration<Object> customConfiguration = (CustomConfiguration<Object>) requirement; log.debug("Configuration object associated with requirement " + requirement.getClass() + " is " + customConfiguration.getConfigurationClass()); boolean configurationSet = false; for (Object configuration : this.configurations) { if(customConfiguration.getConfigurationClass().isAssignableFrom(configuration.getClass())){ customConfiguration.setConfiguration(configuration); log.debug("Configuration successfully set"); configurationSet = true; break; } } if (!configurationSet) { throw new RedDeerConfigurationException("None of the given configurations " + "could have ben set as configuration of the requirement " + requirement.getClass().getName()); } }
Source:
<code>public boolean addTrackingIds(final Collection<String> trackingIds) { <START> this.trackingIds.addAll(trackingIds); <END> return true; }</code><technical_language>returned result of addAll returned a bit more meaningful. This (historic) boolean API is a bit weird though</technical_language>

Target:
public boolean addTrackingIds(final Collection<String> trackingIds) { return this.trackingIds.addAll(trackingIds); }
Source:
<code>public static URLConnection open(URL url) throws IOException { Jenkins h = Jenkins.getInstanceOrNull(); <START> final ProxyConfiguration p = h!=null ? h.proxy : null; <END> if(p==null) return url.openConnection(); URLConnection con = url.openConnection(p.createProxy(url.getHost())); if(p.getUserName()!=null) { Authenticator.setDefault(new Authenticator() { @Override public PasswordAuthentication getPasswordAuthentication() { if (getRequestorType()!=RequestorType.PROXY) return null; return new PasswordAuthentication(p.getUserName(), p.getPassword().toCharArray()); } }); } for (URLConnectionDecorator d : URLConnectionDecorator.all()) d.decorate(con); return con; }</code><technical_language>this file is unchanged PR description</technical_language>

Target:
public static URLConnection open(URL url) throws IOException { final ProxyConfiguration p = get(); if(p==null) return url.openConnection(); URLConnection con = url.openConnection(p.createProxy(url.getHost())); if(p.getUserName()!=null) { Authenticator.setDefault(new Authenticator() { @Override public PasswordAuthentication getPasswordAuthentication() { if (getRequestorType()!=RequestorType.PROXY) return null; return new PasswordAuthentication(p.getUserName(), p.getPassword().toCharArray()); } }); } if (JenkinsJVM.isJenkinsJVM()) { decorate(con); } return con; }
Source:
<code>public boolean configure(final StaplerRequest req, final JSONObject formData) throws FormException { try { super.configure(req, formData); this.setReportWith(formData.getString("reportWith")); this.setTargetApiURL(formData.getString("targetApiURL")); this.setTargetApiKey(formData.getString("targetApiKey")); this.setTargetHost(formData.getString("targetHost")); this.setTargetPort(formData.getInt("targetPort")); this.setHostname(formData.getString("hostname")); this.setBlacklist(formData.getString("blacklist")); this.setWhitelist(formData.getString("whitelist")); this.setGlobalTagFile(formData.getString("globalTagFile")); this.setGlobalTags(formData.getString("globalTags")); this.setGlobalJobTags(formData.getString("globalJobTags")); this.setEmitSecurityEvents(formData.getBoolean("emitSecurityEvents")); this.setEmitSystemEvents(formData.getBoolean("emitSystemEvents")); save(); ClientFactory.getClient(DatadogClient.ClientType.valueOf(this.getReportWith()), this.getTargetApiURL(), this.getTargetApiKey(), this.getTargetHost(), this.getTargetPort()); } catch(Exception e){ StringWriter sw = new StringWriter(); e.printStackTrace(new PrintWriter(sw)); <START> logger.severe("Unexpected exception occurred - " + sw.toString()); <END> } return super.configure(req, formData); }</code><technical_language>I fully get this, is is sw.toString show here</technical_language>

Target:
public boolean configure(final StaplerRequest req, final JSONObject formData) throws FormException { try { super.configure(req, formData); this.setReportWith(formData.getString("reportWith")); this.setTargetApiURL(formData.getString("targetApiURL")); this.setTargetApiKey(formData.getString("targetApiKey")); this.setTargetHost(formData.getString("targetHost")); this.setTargetPort(formData.getInt("targetPort")); this.setHostname(formData.getString("hostname")); this.setBlacklist(formData.getString("blacklist")); this.setWhitelist(formData.getString("whitelist")); this.setGlobalTagFile(formData.getString("globalTagFile")); this.setGlobalTags(formData.getString("globalTags")); this.setGlobalJobTags(formData.getString("globalJobTags")); this.setEmitSecurityEvents(formData.getBoolean("emitSecurityEvents")); this.setEmitSystemEvents(formData.getBoolean("emitSystemEvents")); save(); ClientFactory.getClient(DatadogClient.ClientType.valueOf(this.getReportWith()), this.getTargetApiURL(), this.getTargetApiKey(), this.getTargetHost(), this.getTargetPort()); } catch(Exception e){ DatadogUtilities.severe(logger, e, "An unexpected error occurred: "); } return super.configure(req, formData); }
Source:
<code>protected String getSupportedStorageFormats(Version version) { <START> return Config.getValue(ConfigValues.SupportedStorageFormats, version.toString()); <END> }</code><technical_language>a nice change, unrelated this patch in a separate one</technical_language>

Target:
protected String getSupportedStorageFormats(Version version) { return Config.<String> getValue(ConfigValues.SupportedStorageFormats, version.toString()); }
Source:
<code>public FileTailerSink(FileTailerQueue queue, StreamWriter writer, SinkStrategy strategy, FileTailerStateProcessor stateProcessor, FileTailerMetricsProcessor metricsProcessor, int packSize) { <START> if (writer == null) { <END> throw new IllegalArgumentException("Writer can't be empty!"); } this.stateProcessor = stateProcessor; this.metricsProcessor = metricsProcessor; this.queue = queue; this.writer = writer; this.strategy = strategy; this.packSize = packSize; this.random = new Random(); }</code><technical_language>specifically check for writer is null for other arguments? a bit awkward me</technical_language>

Target:
public FileTailerSink(FileTailerQueue queue, StreamWriter writer, SinkStrategy strategy, FileTailerStateProcessor stateProcessor, FileTailerMetricsProcessor metricsProcessor, int packSize) { this.stateProcessor = stateProcessor; this.metricsProcessor = metricsProcessor; this.queue = queue; this.writer = writer; this.strategy = strategy; this.packSize = packSize; this.random = new Random(); }
Source:
<code>public void stop() { <START> hzInstance.getReplicatedMap(CLIENT_UUIDS).remove(hzInstance.getLocalEndpoint().getUuid()); <END> hzInstance.shutdown(); }</code><technical_language>This constant WORKER_UUIDS. 1. this a UT is missing (if UT existed, fail entry in WORKER_UUIDS map for current local endpoint cleared) 2. entry is cleared another piece of code this is useless</technical_language>

Target:
public void stop() { hzInstance.shutdown(); }
Source:
<code>public JPanel drawPreviewOnJPanel() { JPanel pdfImagePanel = new JPanel(); Image generatedImage = PDFPreviewBuilder.buildPDFPreview(selectedPage, viewZoom); if (generatedImage != null) { try { ImageIcon icon = new ImageIcon(generatedImage); JLabel picLabel = new JLabel(icon); pdfImagePanel.add(picLabel); <START> } catch (OutOfMemoryError oome) { <END> } } PDFService.closeDocument(); return pdfImagePanel; }</code><technical_language>Catching OutOfMemoryError is pointless. is preventing stacktrace shown user predict system's behaviour</technical_language>

Target:
public JPanel drawPreviewOnJPanel() { JPanel pdfImagePanel = new JPanel(); Image generatedImage = PDFPreviewBuilder.buildPDFPreview(selectedPage, viewZoom); if (generatedImage != null) { ImageIcon icon = new ImageIcon(generatedImage); JLabel picLabel = new JLabel(icon); pdfImagePanel.add(picLabel); } PDFService.closeDocument(); return pdfImagePanel; }
Source:
<code>private List<List<Long>> readWorkerExecutors(IStormClusterState stormClusterState, String topologyId, String assignmentId, int port) { LOG.info("Reading assignments"); List<List<Long>> executorsAssignedToThisWorker = new ArrayList<>(); executorsAssignedToThisWorker.add(Constants.SYSTEM_EXECUTOR_ID); Map<List<Long>, NodeInfo> executorToNodePort = getLocalAssignment(conf, stormClusterState, topologyId).get_executor_node_port(); for (Map.Entry<List<Long>, NodeInfo> entry : executorToNodePort.entrySet()) { NodeInfo nodeInfo = entry.getValue(); <START> if (nodeInfo.get_node().startsWith(assignmentId) && nodeInfo.get_port().iterator().next() == port) { <END> executorsAssignedToThisWorker.add(entry.getKey()); } } return executorsAssignedToThisWorker; }</code><technical_language>assignmentId be? this change</technical_language>

Target:
private List<List<Long>> readWorkerExecutors(IStormClusterState stormClusterState, String topologyId, String assignmentId, int port) { LOG.info("Reading assignments"); List<List<Long>> executorsAssignedToThisWorker = new ArrayList<>(); executorsAssignedToThisWorker.add(Constants.SYSTEM_EXECUTOR_ID); Map<List<Long>, NodeInfo> executorToNodePort = getLocalAssignment(stormClusterState, topologyId).get_executor_node_port(); for (Map.Entry<List<Long>, NodeInfo> entry : executorToNodePort.entrySet()) { NodeInfo nodeInfo = entry.getValue(); if (nodeInfo.get_node().equals(assignmentId) && nodeInfo.get_port().iterator().next() == port) { executorsAssignedToThisWorker.add(entry.getKey()); } } return executorsAssignedToThisWorker; }
Source:
<code>public static void main(String[] args) throws Exception { if (args.length < 4) { System.err.println("Usage: WebLogAnalysis <docs> <ranks> <visits> <output>"); return; } String docsInput = args[0]; String ranksInput = args[1]; String visitsInput = args[2]; String output = args[3]; final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); DataSet<Tuple2<String, String>> docs = env.readCsvFile(docsInput) .fieldDelimiter('|') .types(String.class, String.class); DataSet<Tuple3<Integer, String, Integer>> ranks = env.readCsvFile(ranksInput) .fieldDelimiter('|') .types(Integer.class, String.class, Integer.class); DataSet<Tuple2<String, String>> visits = env.readCsvFile(visitsInput) .fieldDelimiter('|') .includeFields("011000000") .types(String.class, String.class); DataSet<Tuple1<String>> filterDocs = docs.filter(new FilterDocs()).project("TF").types(String.class); DataSet<Tuple3<Integer, String, Integer>> filterRanks = ranks.filter(new FilterRanks()); DataSet<Tuple1<String>> filterVisits = visits.filter(new FilterVisits()).project("TF").types(String.class); DataSet<Tuple3<Integer, String, Integer>> joinDocsRanks = filterDocs.join(filterRanks) <START> .where(0).equalTo(1).with(new JoinDocRanks()); <END> DataSet<Tuple3<Integer, String, Integer>> antiJoinVisits = joinDocsRanks.coGroup(filterVisits) .where(1).equalTo(0).with(new AntiJoinVisits()); if (output.equals("STDOUT")) { antiJoinVisits.print(); } else { antiJoinVisits.writeAsCsv(output, "\n", "|"); } env.execute(); }</code><technical_language>ProjectionJoin merged master. replace UDF join a projection join remove UDF</technical_language>

Target:
public static void main(String[] args) throws Exception { if (args.length < 4) { System.err.println("Usage: WebLogAnalysis <docs> <ranks> <visits> <output>"); return; } String docsInput = args[0]; String ranksInput = args[1]; String visitsInput = args[2]; String output = args[3]; final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); DataSet<Tuple2<String, String>> docs = env.readCsvFile(docsInput) .fieldDelimiter('|') .types(String.class, String.class); DataSet<Tuple3<Integer, String, Integer>> ranks = env.readCsvFile(ranksInput) .fieldDelimiter('|') .types(Integer.class, String.class, Integer.class); DataSet<Tuple2<String, String>> visits = env.readCsvFile(visitsInput) .fieldDelimiter('|') .includeFields("011000000") .types(String.class, String.class); DataSet<Tuple1<String>> filterDocs = docs.filter(new FilterDocs()).project(0).types(String.class); DataSet<Tuple3<Integer, String, Integer>> filterRanks = ranks.filter(new FilterRanks()); DataSet<Tuple1<String>> filterVisits = visits.filter(new FilterVisits()).project(0).types(String.class); DataSet<Tuple3<Integer, String, Integer>> joinDocsRanks = filterDocs.join(filterRanks) .where(0).equalTo(1).projectSecond(0,1,2).types(Integer.class, String.class, Integer.class); DataSet<Tuple3<Integer, String, Integer>> antiJoinVisits = joinDocsRanks.coGroup(filterVisits) .where(1).equalTo(0).with(new AntiJoinVisits()); if (output.equals("STDOUT")) { antiJoinVisits.print(); } else { antiJoinVisits.writeAsCsv(output, "\n", "|"); } env.execute(); }
Source:
<code>private void createConfigEvent(ITestResult iTestResult) { String description = iTestResult.getMethod().getDescription(); if (description==null || description.trim().isEmpty()) { description = getConfigMethodType(iTestResult); } <START> TestCaseStartedEvent event = new TestCaseStartedEvent(getSuiteUid(iTestResult.getTestContext()), iTestResult.getName()); <END> event.setDescription(new Description().withValue(description)); AnnotationManager am = new AnnotationManager(getMethodAnnotations(iTestResult)); am.setDefaults(getClassAnnotations(iTestResult)); am.update(event); getLifecycle().fire(event); }</code><technical_language>wrap this line (column limit 100)</technical_language>

Target:
private void createConfigEvent(ITestResult iTestResult) { String description = iTestResult.getMethod().getDescription(); if (description == null || description.isEmpty()) { description = getConfigMethodType(iTestResult).getName(); } String suiteUid = getSuiteUid(iTestResult.getTestContext()); TestCaseStartedEvent event = new TestCaseStartedEvent(suiteUid, iTestResult.getName()); event.setDescription(new Description().withValue(description)); AnnotationManager am = new AnnotationManager(getMethodAnnotations(iTestResult)); am.setDefaults(getClassAnnotations(iTestResult)); am.update(event); getLifecycle().fire(event); }
Source:
<code>public void clear() { commands.clear(); <START> ; <END> items.clear(); getView().clear(); }</code><technical_language>Useless statement</technical_language>

Target:
public void clear() { commands.clear(); items.clear(); getView().clear(); }
Source:
<code><START> public static final Builder v1Builder(String name) { <END> return new Builder(name, V1MarshallerSet.marshallers(), V1MarshallerSet.setMarshallers(), StandardUnmarshallerSet.unmarshallers(), StandardUnmarshallerSet.setUnmarshallers()); }</code><technical_language>Is define constants builder? final is redundant for static methods</technical_language>

Target:
public static Builder v1Builder(String name) { return new Builder(name, V1MarshallerSet.marshallers(), V1MarshallerSet.setMarshallers(), StandardUnmarshallerSet.unmarshallers(), StandardUnmarshallerSet.setUnmarshallers()); }