nus-yam/ex-repair huggingface dataset:
Buggy code:
public class InstanceofExpression extends Expression { public static final ChildPropertyDescriptor LEFT_OPERAND_PROPERTY = new ChildPropertyDescriptor ( InstanceofExpression . class , "leftOperand" , Expression . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; public static final ChildPropertyDescriptor RIGHT_OPERAND_PROPERTY = new ChildPropertyDescriptor ( InstanceofExpression . class , "rightOperand" , Type . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Expression leftOperand = null ; private Type rightOperand = null ; InstanceofExpression ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { InstanceofExpression result = new InstanceofExpression ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setLeftOperand ( ( ( Expression ) ( getLeftOperand ( ) . clone ( target ) ) ) ) ; result . setRightOperand ( ( ( Type ) ( getRightOperand ( ) . clone ( target ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getLeftOperand ( ) { } public void setLeftOperand ( Expression expression ) { } public Type getRightOperand ( ) { } public void setRightOperand ( Type referenceType ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class CopyResourceElementsOperation extends MultiOperation { protected ArrayList fRenamedCompilationUnits = null ; protected Map fDeltasPerProject = new HashMap ( 1 ) ; protected DOMFactory fFactory ; protected ArrayList fCreatedElements ; public CopyResourceElementsOperation ( IJavaElement [ ] resourcesToCopy , IJavaElement [ ] destContainers , boolean force ) { } public CopyResourceElementsOperation ( IJavaElement [ ] resourcesToCopy , IJavaElement destContainer , boolean force ) { } private IResource [ ] collectResourcesOfInterest ( IPackageFragment source ) throws JavaModelException { } private void createNeededPackageFragments ( IPackageFragmentRoot root , String newFragName , boolean moveFolder ) throws JavaModelException { } private JavaElementDelta getDeltaFor ( IJavaProject javaProject ) { } protected String getMainTaskName ( ) { } protected void prepareDeltas ( IJavaElement sourceElement , IJavaElement destinationElement , boolean isMove ) { <START_BUG> if ( org . eclipse . jdt . internal . core . Util . isExcluded ( destinationElement ) ) <END_BUG> return ; IJavaProject destProject = destinationElement . getJavaProject ( ) ; if ( isMove ) { IJavaProject sourceProject = sourceElement . getJavaProject ( ) ; getDeltaFor ( sourceProject ) . movedFrom ( sourceElement , destinationElement ) ; getDeltaFor ( destProject ) . movedTo ( destinationElement , sourceElement ) ; } else { getDeltaFor ( destProject ) . added ( destinationElement ) ; } } private void processCompilationUnitResource ( ICompilationUnit source , IPackageFragment dest ) throws JavaModelException { } protected void processDeltas ( ) { } protected void processElement ( IJavaElement element ) throws JavaModelException { } protected void processElements ( ) throws JavaModelException { } private void processPackageFragmentResource ( IPackageFragment source , IPackageFragmentRoot root , String newName ) throws JavaModelException { } private String updatedContent ( ICompilationUnit cu , IPackageFragment dest , String newName ) throws JavaModelException { } private void updatePackageStatement ( IDOMCompilationUnit domCU , String pkgName ) throws JavaModelException { } private void updateTypeName ( ICompilationUnit cu , IDOMCompilationUnit domCU , String oldName , String newName ) throws JavaModelException { } protected IJavaModelStatus verify ( ) { } protected void verify ( IJavaElement element ) throws JavaModelException { } }

Fix:
if ( ( org . eclipse . jdt . internal . core . Util . isExcluded ( sourceElement ) ) || ( org . eclipse . jdt . internal . core . Util . isExcluded ( destinationElement ) ) )
Buggy code:
public class RTFTransfer extends ByteArrayTransfer { private static RTFTransfer _instance = new RTFTransfer ( ) ; private static final String TEXT_RTF = "text//rtf" ; private static final int TEXT_RTF_ID = registerType ( RTFTransfer . TEXT_RTF ) ; private static final String TEXT_RTF2 = "TEXT//RTF" ; private static final int TEXT_RTF2_ID = registerType ( RTFTransfer . TEXT_RTF2 ) ; private static final String APPLICATION_RTF = "application//rtf" ; private static final int APPLICATION_RTF_ID = registerType ( RTFTransfer . APPLICATION_RTF ) ; private RTFTransfer ( ) { } public static RTFTransfer getInstance ( ) { } public void javaToNative ( Object object , TransferData transferData ) { transferData . result = 0 ; if ( ( ! ( checkRTF ( object ) ) ) || ( ! ( isSupportedType ( transferData ) ) ) ) { DND . error ( ERROR_INVALID_DATA ) ; } String string = ( ( String ) ( object ) ) ; byte [ ] buffer = Converter . wcsToMbcs ( null , string , true ) ; int pValue = OS . XtMalloc ( buffer . length ) ; if ( pValue == 0 ) return ; OS . memmove ( pValue , buffer , buffer . length ) ; <START_BUG> transferData . length = buffer . length ; <END_BUG> transferData . format = 8 ; transferData . pValue = pValue ; transferData . result = 1 ; } public Object nativeToJava ( TransferData transferData ) { } protected int [ ] getTypeIds ( ) { } protected String [ ] getTypeNames ( ) { } boolean checkRTF ( Object object ) { } protected boolean validate ( Object object ) { } }

Fix:
transferData . length = ( buffer . length ) - 1 ;
Buggy code:
public class SimpleClass implements SimpleInterface { public void method ( int a , SimpleClass c ) { <START_BUG> System . out . println ( "Actual<seq2seq4repair_space>implementation<seq2seq4repair_space>is<seq2seq4repair_space>called" ) ; <END_BUG> } public void method ( int a ) { } public void someOtherMethod ( ) { } }

Fix:
System . out . println ( "The<seq2seq4repair_space>actual<seq2seq4repair_space>invocation<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>annotated<seq2seq4repair_space>method<seq2seq4repair_space>occurred." ) ;
Buggy code:
public class JakartaOroMatcher implements RegexpMatcher { protected final Perl5Compiler compiler = new Perl5Compiler ( ) ; protected final Perl5Matcher matcher = new Perl5Matcher ( ) ; private String pattern ; public JakartaOroMatcher ( ) { } public void setPattern ( String pattern ) { } public Vector getGroups ( String argument ) throws BuildException { } public Vector getGroups ( String input , int options ) throws BuildException { } public String getPattern ( ) { } public boolean matches ( String argument ) throws BuildException { } public boolean matches ( String input , int options ) throws BuildException { } protected Pattern getCompiledPattern ( int options ) throws BuildException { try { Pattern p = compiler . compile ( pattern , getCompilerOptions ( options ) ) ; return p ; } catch ( Exception e ) { <START_BUG> throw new BuildException ( e ) ; <END_BUG> } } protected int getCompilerOptions ( int options ) { } }

Fix:
throw new BuildException ( "Error" , e ) ;
Buggy code:
final class StringToCharacterConverter implements Converter < String , Character > { public Character convert ( String source ) { <START_BUG> if ( "" . equals ( source ) ) { <END_BUG> return null ; } if ( ( source . length ( ) ) > 1 ) { throw new IllegalArgumentException ( ( ( ( "Can<seq2seq4repair_space>only<seq2seq4repair_space>convert<seq2seq4repair_space>a<seq2seq4repair_space>[String]<seq2seq4repair_space>with<seq2seq4repair_space>length<seq2seq4repair_space>of<seq2seq4repair_space>1<seq2seq4repair_space>to<seq2seq4repair_space>a<seq2seq4repair_space>[Character];<seq2seq4repair_space>string<seq2seq4repair_space>value<seq2seq4repair_space>'" + source ) + "'<seq2seq4repair_space>has<seq2seq4repair_space>length<seq2seq4repair_space>of<seq2seq4repair_space>" ) + ( source . length ( ) ) ) ) ; } return source . charAt ( 0 ) ; } }

Fix:
if ( ( source . length ( ) ) == 0 ) {
Buggy code:
public class URLTransfer extends ByteArrayTransfer { static URLTransfer _instance = new URLTransfer ( ) ; private static final String TEXT_UNICODE = "text//unicode" ; private static final int TEXT_UNICODE_ID = registerType ( URLTransfer . TEXT_UNICODE ) ; private URLTransfer ( ) { } public static URLTransfer getInstance ( ) { } public void javaToNative ( Object object , TransferData transferData ) { } public Object nativeToJava ( TransferData transferData ) { if ( ( ! ( isSupportedType ( transferData ) ) ) || ( ( transferData . pValue ) == 0 ) ) return null ; int size = ( ( ( ( transferData . format ) * ( transferData . length ) ) // 8 ) // 2 ) * 2 ; if ( size <= 0 ) return null ; <START_BUG> byte [ ] chars = new byte [ size ] ; <END_BUG> OS . memmove ( chars , transferData . pValue , size ) ; String string = new String ( chars ) ; int end = string . indexOf ( '' ) ; return end == ( - 1 ) ? string : string . substring ( 0 , end ) ; } protected int [ ] getTypeIds ( ) { } protected String [ ] getTypeNames ( ) { } boolean checkURL ( Object object ) { } protected boolean validate ( Object object ) { } }

Fix:
char [ ] chars = new char [ size // 2 ] ;
Buggy code:
public abstract class Entity { private ArrayList < Component > componentList ; private UUID entityUUID ; protected Rectangle size ; protected Rectangle bounds = new Rectangle ( ) ; public Entity ( Component [ ] componentsToRegister , Point pos ) { } public UUID getUUID ( ) { } public Point getPosition ( ) { } public void setPosition ( Point newPos ) { } public Dimension getSize ( ) { } public Rectangle getCollisionBounds ( ) { } public void registerSurfaceUpdateListener ( SurfaceUpdateListener ear ) { } public ArrayList < Component > getComponentList ( ) { } private void registerComponent ( Component componentToReg ) { } public boolean hasComponentType ( Class < ? extends Component > componentClass ) { } public < T extends Component > T getComponentByType ( Class < T > componentClass ) { } public void move ( Point deltaPos ) { } public void bump ( Point deltaPos ) { <START_BUG> setPosition ( deltaPos ) ; <END_BUG> } }

Fix:
setPosition ( new Point ( ( ( getPosition ( ) . x ) + ( deltaPos . x ) ) , ( ( getPosition ( ) . y ) + ( deltaPos . y ) ) ) ) ;
Buggy code:
public class GooglePlayPage extends HeaderPage { private static final Logger logger = LogManager . getLogger ( GooglePlayPage . class ) ; @ FindBy ( how = How . XPATH , using = "////a[contains(@class,'see-more')<seq2seq4repair_space>and<seq2seq4repair_space>contains(@class,'apps')<seq2seq4repair_space>and<seq2seq4repair_space>contains(@href,'store')]" ) private WebElement seeMoreAppsLnk ; @ FindBy ( how = How . ID , using = "show-more-button" ) private WebElement showMoreAppsBtn ; public void openPageForAnApp ( String appName ) { GooglePlayPage . logger . info ( String . format ( "Opening<seq2seq4repair_space>page<seq2seq4repair_space>for:<seq2seq4repair_space>'%s'<seq2seq4repair_space>application" , appName ) ) ; long countBefore = 0 ; long countAfter = 0 ; <START_BUG> Browser . implicitWait ( ) ; <END_BUG> boolean keepSearching = true ; while ( keepSearching ) { keepSearching = false ; try { String xpath = String . format ( "////a[@title='%s']" , appName ) ; WebElement element = Browser . getWebDriver ( ) . findElement ( By . xpath ( xpath ) ) ; Browser . clickOnWebElement ( element ) ; } catch ( NoSuchElementException e ) { keepSearching = true ; } if ( keepSearching ) { countBefore = getCountOfApps ( ) ; if ( Browser . checkIfElementExists ( seeMoreAppsLnk ) ) Browser . clickOnWebElement ( seeMoreAppsLnk ) ; Actions builder = new Actions ( Browser . getWebDriver ( ) ) ; Browser . executeJavaScript ( "window.scrollTo(0,Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,document.documentElement.clientHeight));" ) ; builder . moveToElement ( appsBtn ) . perform ( ) ; Browser . executeJavaScript ( "window.scrollTo(0,Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,document.documentElement.clientHeight));" ) ; Browser . implicitWait ( 3000 ) ; if ( Browser . checkIfElementExists ( showMoreAppsBtn ) ) Browser . clickOnWebElement ( showMoreAppsBtn ) ; Browser . implicitWait ( 3000 ) ; countAfter = getCountOfApps ( ) ; if ( countBefore == countAfter ) { throw new NotFoundException ( String . format ( "Cannot<seq2seq4repair_space>find<seq2seq4repair_space>following<seq2seq4repair_space>%s<seq2seq4repair_space>application" , appName ) ) ; } } } } private long getCountOfApps ( ) { } public void goTo ( ) { } public boolean isAt ( ) { } }

Fix:
Browser . implicitWait ( 1000 ) ;
Buggy code:
public class IDValue { protected String fValue ; protected XSSimpleType fValidator ; public IDValue ( String value , XSSimpleType val ) { } public boolean isDuplicateOf ( IDValue value ) { } private static final ValidationState VS = new ValidationState ( ) ; private boolean isDuplicateOf ( XSSimpleType dv , String v1 , String v2 ) { try { Object av1 = dv . validate ( v1 , IDValue . VS , null ) ; Object av2 = dv . validate ( v2 , IDValue . VS , null ) ; <START_BUG> return dv . isEqual ( av1 , av2 ) ; <END_BUG> } catch ( Exception e ) { return false ; } } public String toString ( ) { } }

Fix:
return av1 . equals ( av2 ) ;
Buggy code:
public class ReadResponseResolver implements IResponseResolver < Row > { private static Logger logger_ = LoggerFactory . getLogger ( ReadResponseResolver . class ) ; private final String table ; private final ConcurrentMap < Message , ReadResponse > results = new org . cliffc . high_scale_lib . NonBlockingHashMap < Message , ReadResponse > ( ) ; private DecoratedKey key ; private ByteBuffer digest ; private static final Message FAKE_MESSAGE = new Message ( FBUtilities . getLocalAddress ( ) , Verb . INTERNAL_RESPONSE , ArrayUtils . EMPTY_BYTE_ARRAY , MessagingService . version_ ) ; public ReadResponseResolver ( String table , ByteBuffer key ) { } public Row getData ( ) throws IOException { } public Row resolve ( ) throws IOException , DigestMismatchException { } public static void maybeScheduleRepairs ( ColumnFamily resolved , String table , DecoratedKey key , List < ColumnFamily > versions , List < InetAddress > endpoints ) { } static ColumnFamily resolveSuperset ( List < ColumnFamily > versions ) { } public void preprocess ( Message message ) { byte [ ] body = message . getMessageBody ( ) ; ByteArrayInputStream bufIn = new ByteArrayInputStream ( body ) ; try { <START_BUG> ReadResponse result = ReadResponse . serializer ( ) . deserialize ( new DataInputStream ( bufIn ) ) ; <END_BUG> if ( ReadResponseResolver . logger_ . isDebugEnabled ( ) ) ReadResponseResolver . logger_ . debug ( "Preprocessed<seq2seq4repair_space>{}<seq2seq4repair_space>response" , ( result . isDigestQuery ( ) ? "digest" : "data" ) ) ; results . put ( message , result ) ; } catch ( IOException e ) { throw new IOError ( e ) ; } } public void injectPreProcessed ( ReadResponse result ) { } public boolean isDataPresent ( ) { } public Iterable < Message > getMessages ( ) { } public int getMessageCount ( ) { } }

Fix:
ReadResponse result = ReadResponse . serializer ( ) . deserialize ( new DataInputStream ( bufIn ) , message . getVersion ( ) ) ;
Buggy code:
public class NewEeExtension implements NewExtension { public static final String NAMESPACE = "urn:jboss:domain:ee:1.0" ; private static final String SUBSYSTEM_NAME = "ee" ; private static final NewEeExtension . EESubsystemParser parser = new NewEeExtension . EESubsystemParser ( ) ; public void initialize ( NewExtensionContext context ) { } public void initializeParsers ( ExtensionParsingContext context ) { } static class EESubsystemParser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > , XMLElementWriter < ModelNode > { public void writeContent ( XMLExtendedStreamWriter writer , ModelNode node ) throws XMLStreamException { } public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException { ParseUtils . requireNoAttributes ( reader ) ; ParseUtils . requireNoContent ( reader ) ; final ModelNode subsystem = new ModelNode ( ) ; subsystem . get ( OP ) . set ( ADD ) ; <START_BUG> subsystem . get ( OP_ADDR ) . set ( SUBSYSTEM , NewEeExtension . SUBSYSTEM_NAME ) ; <END_BUG> } } }

Fix:
subsystem . get ( OP_ADDR ) . add ( SUBSYSTEM , NewEeExtension . SUBSYSTEM_NAME ) ;
Buggy code:
public class RowMutationVerbHandler implements IVerbHandler { protected static class RowMutationContext { protected Row row_ = new Row ( ) ; protected DataInputBuffer buffer_ = new DataInputBuffer ( ) ; } private static Logger logger_ = Logger . getLogger ( RowMutationVerbHandler . class ) ; private static ThreadLocal < RowMutationVerbHandler . RowMutationContext > tls_ = new InheritableThreadLocal < RowMutationVerbHandler . RowMutationContext > ( ) ; public void doVerb ( Message message ) { <START_BUG> byte [ ] bytes = ( ( byte [ ] ) ( message . getMessageBody ( ) [ 0 ] ) ) ; <END_BUG> RowMutationVerbHandler . RowMutationContext rowMutationCtx = RowMutationVerbHandler . tls_ . get ( ) ; if ( rowMutationCtx == null ) { rowMutationCtx = new RowMutationVerbHandler . RowMutationContext ( ) ; RowMutationVerbHandler . tls_ . set ( rowMutationCtx ) ; } rowMutationCtx . buffer_ . reset ( bytes , bytes . length ) ; try { RowMutation rm = RowMutation . serializer ( ) . deserialize ( rowMutationCtx . buffer_ ) ; RowMutationVerbHandler . logger_ . debug ( ( "Applying<seq2seq4repair_space>" + rm ) ) ; byte [ ] hintedBytes = message . getHeader ( HINT ) ; if ( ( hintedBytes != null ) && ( ( hintedBytes . length ) > 0 ) ) { EndPoint hint = EndPoint . fromBytes ( hintedBytes ) ; RowMutationVerbHandler . logger_ . debug ( ( "Adding<seq2seq4repair_space>hint<seq2seq4repair_space>for<seq2seq4repair_space>" + hint ) ) ; RowMutation hintedMutation = new RowMutation ( rm . table ( ) , HintedHandOffManager . key_ ) ; hintedMutation . addHints ( ( ( ( rm . key ( ) ) + ":" ) + ( hint . getHost ( ) ) ) ) ; hintedMutation . apply ( ) ; } long start = System . currentTimeMillis ( ) ; rowMutationCtx . row_ . clear ( ) ; rowMutationCtx . row_ . key ( rm . key ( ) ) ; rm . apply ( rowMutationCtx . row_ ) ; long end = System . currentTimeMillis ( ) ; WriteResponse response = new WriteResponse ( rm . table ( ) , rm . key ( ) , true ) ; Message responseMessage = WriteResponse . makeWriteResponseMessage ( message , response ) ; RowMutationVerbHandler . logger_ . debug ( ( ( ( ( ( "Mutation<seq2seq4repair_space>applied<seq2seq4repair_space>in<seq2seq4repair_space>" + ( end - start ) ) + "ms.<seq2seq4repair_space>Sending<seq2seq4repair_space>response<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( message . getFrom ( ) ) ) + "<seq2seq4repair_space>for<seq2seq4repair_space>key<seq2seq4repair_space>:" ) + ( rm . key ( ) ) ) ) ; MessagingService . getMessagingInstance ( ) . sendOneWay ( responseMessage , message . getFrom ( ) ) ; } catch ( IOException e ) { RowMutationVerbHandler . logger_ . error ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>row<seq2seq4repair_space>mutation" , e ) ; } } }

Fix:
byte [ ] bytes = message . getMessageBody ( ) ;
Buggy code:
public class ParenthesizedExpression extends Expression { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( ParenthesizedExpression . class , "expression" , Expression . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Expression expression = null ; ParenthesizedExpression ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { if ( ( this . expression ) == null ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ( this . expression ) == null ) { preLazyInit ( ) ; this . expression = new SimpleName ( this . ast ) ; postLazyInit ( this . expression , ParenthesizedExpression . EXPRESSION_PROPERTY ) ; } } } return this . expression ; } public void setExpression ( Expression expression ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class StreamRequestVerbHandler implements IVerbHandler { private static Logger logger = LoggerFactory . getLogger ( StreamRequestVerbHandler . class ) ; public void doVerb ( Message message , String id ) { if ( StreamRequestVerbHandler . logger . isDebugEnabled ( ) ) StreamRequestVerbHandler . logger . debug ( "Received<seq2seq4repair_space>a<seq2seq4repair_space>StreamRequestMessage<seq2seq4repair_space>from<seq2seq4repair_space>{}" , message . getFrom ( ) ) ; byte [ ] body = message . getMessageBody ( ) ; ByteArrayInputStream bufIn = new ByteArrayInputStream ( body ) ; try { StreamRequestMessage srm = StreamRequestMessage . serializer ( ) . deserialize ( new DataInputStream ( bufIn ) , message . getVersion ( ) ) ; if ( StreamRequestVerbHandler . logger . isDebugEnabled ( ) ) StreamRequestVerbHandler . logger . debug ( srm . toString ( ) ) ; StreamOutSession session = StreamOutSession . create ( srm . table , message . getFrom ( ) , srm . sessionId ) ; <START_BUG> StreamOut . transferRanges ( session , srm . columnFamilies , srm . ranges , srm . type ) ; <END_BUG> } catch ( IOException ex ) { throw new IOError ( ex ) ; } } }

Fix:
StreamOut . transferRangesForRequest ( session , srm . ranges , srm . type ) ;
Buggy code:
public class TrialPrinter { private String timeStamp ; private OnePlusOneEvo function ; private File file ; public TrialPrinter ( OnePlusOneEvo function , boolean oneFifth , String bOrStepSize ) { } public void writeTrial ( String x , String fitnessValue ) { } public OnePlusOneEvo getFunction ( ) { } public void setFunction ( OnePlusOneEvo function ) { } public File getFile ( ) { } public String getTimeStamp ( ) { } public void setTimeStamp ( ) { } private File generateTrialFile ( OnePlusOneEvo function , boolean oneFifth , String bOrStepSize ) { String path = "" ; if ( oneFifth ) <START_BUG> path = ( "Trials//1Fifth" + ( function . getMutator ( ) . getClass ( ) . getSimpleName ( ) ) ) + "//" ; <END_BUG> else path = ( "Trials//" + ( function . getMutator ( ) . getClass ( ) . getSimpleName ( ) ) ) + "//" ; if ( bOrStepSize != null ) path += bOrStepSize + "//" ; String timeStamp = getTimeStamp ( ) ; String filename = ( path + timeStamp ) + ".txt" ; return new File ( filename ) ; } No newline ; at end ; of file ; }

Fix:
path = ( "Trials//1Fifth//" + ( function . getMutator ( ) . getClass ( ) . getSimpleName ( ) ) ) + "//" ;
Buggy code:
public class JGroupsSubsystemDescribe implements OperationStepHandler , DescriptionProvider { @ Override public ModelNode getModelDescription ( Locale locale ) { <START_BUG> return LocalDescriptions . getSubsystemDescribeDescription ( locale ) ; <END_BUG> } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } }

Fix:
return JGroupsDescriptions . getSubsystemDescribeDescription ( locale ) ;
Buggy code:
public class ImportWizard extends Wizard { private IWorkbench workbench ; private IStructuredSelection selection ; class SelectionPage extends WorkbenchWizardListSelectionPage { SelectionPage ( IWorkbench w , IStructuredSelection ss , AdaptableList e , String s ) { } public void createControl ( Composite parent ) { } public IWizardNode createWizardNode ( WorkbenchWizardElement element ) { } } public void addPages ( ) { } protected AdaptableList getAvailableImportWizards ( ) { } public void init ( IWorkbench aWorkbench , IStructuredSelection currentSelection ) { } public boolean performFinish ( ) { ImportWizard . SelectionPage first = ( ( ImportWizard . SelectionPage ) ( getPages ( ) [ 0 ] ) ) ; first . saveWidgetValues ( ) ; <START_BUG> RoleManager . getInstance ( ) . enableRoles ( first . getSelectedNode ( ) . getWizard ( ) . getClass ( ) . getName ( ) ) ; <END_BUG> return true ; } }

Fix:
RoleManager . getInstance ( ) . enableActivities ( first . getSelectedNode ( ) . getWizard ( ) . getClass ( ) . getName ( ) ) ;
Buggy code:
public class JDBCBrokerFactory extends AbstractBrokerFactory { private static final Localizer _loc = Localizer . forPackage ( JDBCBrokerFactory . class ) ; private boolean _synchronizedMappings = false ; public static JDBCBrokerFactory newInstance ( ConfigurationProvider cp ) { } public static JDBCBrokerFactory getInstance ( ConfigurationProvider cp ) { } public static synchronized JDBCBrokerFactory getInstance ( JDBCConfiguration conf ) { } public JDBCBrokerFactory ( JDBCConfiguration conf ) { } public Properties getProperties ( ) { } protected StoreManager newStoreManager ( ) { } protected BrokerImpl newBrokerImpl ( String user , String pass ) { } private void synchronizeMappings ( ClassLoader loader ) { JDBCConfiguration conf = ( ( JDBCConfiguration ) ( getConfiguration ( ) ) ) ; String action = conf . getSynchronizeMappings ( ) ; if ( ( action == null ) || ( ( action . length ( ) ) == 0 ) ) return ; <START_BUG> Collection classes = conf . getMetaDataRepository ( ) . loadPersistentTypes ( false , loader ) ; <END_BUG> if ( classes . isEmpty ( ) ) return ; String props = Configurations . getProperties ( action ) ; action = Configurations . getClassName ( action ) ; MappingTool tool = new MappingTool ( conf , action , false ) ; Configurations . configureInstance ( tool , conf , props , "SynchronizeMappings" ) ; Class cls ; for ( Iterator itr = classes . iterator ( ) ; itr . hasNext ( ) ; ) { cls = ( ( Class ) ( itr . next ( ) ) ) ; try { tool . run ( cls ) ; } catch ( IllegalArgumentException iae ) { throw new org . apache . openjpa . util . UserException ( JDBCBrokerFactory . _loc . get ( "bad-synch-mappings" , action , Arrays . asList ( ACTIONS ) ) ) ; } } tool . record ( ) ; } }

Fix:
Collection classes = conf . getMetaDataRepositoryInstance ( ) . loadPersistentTypes ( false , loader ) ;
Buggy code:
public class DefaultCommand < T extends Context > implements Command < T > { private static final Logger LOG = Logger . getLogger ( DefaultCommand . class ) ; protected String processID ; public DefaultCommand ( String processID ) { } public DefaultCommand ( ) { } @ Override public String getProcessID ( ) { } @ Override public void execute ( T context ) throws CommandException { } @ Override public boolean executeAsChain ( T context ) { } @ Override public String executeAsProcess ( String startCommand , T context ) { <START_BUG> return "End" ; <END_BUG> } }

Fix:
return null ;
Buggy code:
public class Todo { public enum TYPE { TASK , DEADLINE , EVENT ; } private String title ; private DateTime createdOn ; private DateTime modifiedOn ; private DateTime startTime ; private DateTime endTime ; private boolean isDone ; private Todo . TYPE type ; public Todo ( DateTime currentTime , String userTitle ) { } public Todo ( DateTime currentTime , String userTitle , DateTime deadline ) { } public Todo ( DateTime currentTime , String userTitle , DateTime start , DateTime end ) { } protected Todo ( Todo todo ) { } public String getTitle ( ) { } public void setTitle ( String title ) { } public DateTime getStartTime ( ) { } public void setStartTime ( DateTime startTime ) { } public DateTime getEndTime ( ) { } public void setEndTime ( DateTime endTime ) { } public boolean isDone ( ) { } public void setDone ( boolean isDone ) { } public DateTime getCreatedOn ( ) { } public DateTime getModifiedOn ( ) { } public Todo . TYPE getType ( ) { } public boolean isValid ( ) { if ( ( ( startTime ) != null ) && ( ( endTime ) != null ) ) { type = Todo . TYPE . EVENT ; <START_BUG> if ( startTime . isBefore ( endTime ) ) { <END_BUG> return false ; } } else if ( ( ( startTime ) == null ) && ( ( endTime ) != null ) ) { type = Todo . TYPE . DEADLINE ; } else if ( ( ( startTime ) == null ) && ( ( endTime ) == null ) ) { type = Todo . TYPE . TASK ; } return true ; } public String toString ( ) { } public DateTime getDateTime ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
if ( endTime . isBefore ( startTime ) ) {
Buggy code:
public class ValueEmitter { ProgramEmitter pe ; BasicBlock block ; Variable variable ; ValueEmitter ( ProgramEmitter programEmitter , BasicBlock block , Variable variable ) { } public ProgramEmitter getProgramEmitter ( ) { } public BasicBlock getBlock ( ) { } public Variable getVariable ( ) { } public ValueEmitter getField ( FieldReference field , ValueType type ) { } public void setField ( FieldReference field , ValueType type , ValueEmitter value ) { } public ValueEmitter binary ( BinaryOperation op , NumericOperandType type , ValueEmitter other ) { } public ValueEmitter add ( NumericOperandType type , ValueEmitter other ) { } public ValueEmitter iadd ( ValueEmitter other ) { } public ValueEmitter sub ( NumericOperandType type , ValueEmitter other ) { } public ValueEmitter isub ( ValueEmitter other ) { } public ValueEmitter compare ( NumericOperandType type , ValueEmitter other ) { } public ValueEmitter icompare ( ValueEmitter other ) { } public ValueEmitter neg ( NumericOperandType type ) { } public ValueEmitter ineg ( ) { } public ValueEmitter invoke ( InvocationType type , MethodReference method , ValueEmitter ... arguments ) { } public ValueEmitter invokeSpecial ( MethodReference method , ValueEmitter ... arguments ) { } public ValueEmitter invokeVirtual ( MethodReference method , ValueEmitter ... arguments ) { } public ValueEmitter join ( ValueEmitter other ) { } public ForkEmitter fork ( BinaryBranchingCondition condition , ValueEmitter other ) { } public ForkEmitter fork ( BranchingCondition condition ) { } public void returnValue ( ) { } public ValueEmitter cast ( ValueType type ) { } public ValueEmitter cast ( NumericOperandType from , NumericOperandType to ) { } public ValueEmitter cast ( IntegerSubtype subtype , CastIntegerDirection dir ) { } public ValueEmitter toInteger ( IntegerSubtype from ) { } public ValueEmitter fromInteger ( IntegerSubtype to ) { } public ValueEmitter getElement ( ValueEmitter index ) { Variable result = pe . getProgram ( ) . createVariable ( ) ; GetElementInstruction insn = new GetElementInstruction ( ) ; insn . setArray ( variable ) ; insn . setIndex ( index . variable ) ; <START_BUG> insn . setReceiver ( variable ) ; <END_BUG> pe . addInstruction ( insn ) ; return pe . var ( result ) ; } public ValueEmitter getElement ( int index ) { } public void setElement ( ValueEmitter index , ValueEmitter value ) { } public void setElement ( int index , ValueEmitter value ) { } public ValueEmitter unwrapArray ( ArrayElementType elementType ) { } public ValueEmitter arrayLength ( ) { } public ValueEmitter instanceOf ( ValueType type ) { } public ValueEmitter cloneArray ( ) { } }

Fix:
insn . setReceiver ( result ) ;
Buggy code:
public class AdminTable { public static boolean addAdmin ( String user , String password ) { int insertCount = 0 ; try { <START_BUG> insertCount = DatabaseConnector . executeUpdate ( ( ( ( ( ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>ADMIN\"<seq2seq4repair_space>+<seq2seq4repair_space>" + "VALUES('" ) + user ) + "',<seq2seq4repair_space>'" ) + ( PasswordHash . createHash ( password ) ) ) + "')" ) ) ; <END_BUG> } catch ( NoSuchAlgorithmException | InvalidKeySpecException e ) { e . printStackTrace ( ) ; } return insertCount != 0 ? true : false ; } public static boolean deleteAdmin ( String user ) { } public static boolean verifyPassword ( String user , String password ) { } public static boolean updatePassword ( String user , String newPassword ) { } public static ArrayList < String > getAdmins ( ) { } public static boolean admin_exist ( String admin ) { } public static boolean isEmpty ( ) { } }

Fix:
insertCount = DatabaseConnector . executeUpdate ( ( ( ( ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>ADMIN<seq2seq4repair_space>VALUES('" + user ) + "',<seq2seq4repair_space>'" ) + ( PasswordHash . createHash ( password ) ) ) + "')" ) ) ;
Buggy code:
public class ControlInterface implements Observer { public static final Logger logger = Logger . getLogger ( ControlInterface . class ) ; private WorldState world = WorldState . getInstance ( ) ; private VisionTools vtools = new VisionTools ( ) ; private static int lookahead ; private RobotControl c ; private int drive = DRIVE . ordinal ( ) ; private int kick = KICK . ordinal ( ) ; private int stop = STOP . ordinal ( ) ; public ControlInterface ( int lookahead ) { } public void getNextMovement ( ) { } public static Arc chooseArc ( Plan plan ) { Point2D h = null ; Point2D p = new Point2D ( plan . getOurRobotPositionVisual ( ) ) ; double v = plan . getOurRobotAngle ( ) ; v = ControlInterface . convertAngle ( v ) ; try { h = ControlInterface . findGoalPoint ( plan ) ; } catch ( Exception e ) { ControlInterface . logger . debug ( e ) ; if ( ( plan . getPath ( ) . size ( ) ) > 1 ) { h = new Point2D ( plan . getPath ( ) . get ( ( ( plan . getPath ( ) . size ( ) ) - 1 ) ) ) ; } else { <START_BUG> h = new Point2D ( plan . getPath ( ) . get ( 0 ) ) ; <END_BUG> } } ControlInterface . logger . debug ( String . format ( "v:<seq2seq4repair_space>%f" , v ) ) ; double alpha = ( Math . atan2 ( ( ( h . getY ( ) ) - ( p . getY ( ) ) ) , ( ( h . getX ( ) ) - ( p . getX ( ) ) ) ) ) - v ; ControlInterface . logger . debug ( String . format ( "Alpha:<seq2seq4repair_space>%f" , alpha ) ) ; double d = h . getDistance ( p ) ; ControlInterface . logger . debug ( String . format ( "d:<seq2seq4repair_space>%f" , d ) ) ; double xhc = d * ( Math . cos ( alpha ) ) ; ControlInterface . logger . debug ( String . format ( "xhc:<seq2seq4repair_space>%f" , xhc ) ) ; double R = Math . abs ( ( ( Math . pow ( d , 2 ) ) // ( 2 * xhc ) ) ) ; ControlInterface . logger . debug ( String . format ( "R:<seq2seq4repair_space>%f" , R ) ) ; boolean dir ; if ( xhc >= 0 ) { dir = false ; } else { dir = true ; } Arc arc = new Arc ( R , dir , plan . getAction ( ) ) ; return arc ; } public void implimentArc ( Arc path , Plan plan ) { } public static double convertAngle ( double angle ) { } public static Point2D findGoalPoint ( Plan p ) throws Exception { } public void kick ( ) { } public void drive ( ) { } @ Override public void update ( Observable arg0 , Object arg1 ) { } }

Fix:
h = new Point2D ( 0 , 0 ) ;
Buggy code:
public class CompetitionTable { @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public static void start ( Stage primaryStage ) { } @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) private static void setColor ( TableColumn t ) { t . setCellFactory ( new Callback < TableColumn , TableCell > ( ) { public TableCell call ( TableColumn param ) { return new TableCell < Team , String > ( ) { public void updateItem ( String item , boolean empty ) { super . updateItem ( item , empty ) ; if ( ! ( isEmpty ( ) ) ) { <START_BUG> this . setTextFill ( Color . BLACK ) ; <END_BUG> Team t = saveGame . getDB ( ) . findTeam ( this . getItem ( ) ) ; if ( t . getNm ( ) . equals ( saveGame . getMyTeam ( ) . getNm ( ) ) ) { this . setUnderline ( true ) ; } setText ( item ) ; } } } ; } } ) ; } }

Fix:
this . setUnderline ( false ) ;
Buggy code:
public class NameNodeExecutor extends AbstractNodeExecutor { private final Log log = LogFactory . getLog ( NameNodeExecutor . class ) ; private Task nameNodeTask ; private Task zkfcNodeTask ; @ Inject NameNodeExecutor ( HdfsFrameworkConfig hdfsFrameworkConfig ) { } public static void main ( String [ ] args ) { } @ Override public void launchTask ( final ExecutorDriver driver , final TaskInfo taskInfo ) { } @ Override public void killTask ( ExecutorDriver driver , TaskID taskId ) { } @ Override public void shutdown ( ExecutorDriver d ) { } @ Override public void frameworkMessage ( ExecutorDriver driver , byte [ ] msg ) { super . frameworkMessage ( driver , msg ) ; String messageStr = new String ( msg , Charset . defaultCharset ( ) ) ; File nameDir = new File ( ( ( hdfsFrameworkConfig . getDataDir ( ) ) + "//name" ) ) ; if ( ( messageStr . equals ( NAME_NODE_INIT_MESSAGE ) ) || ( messageStr . equals ( NAME_NODE_BOOTSTRAP_MESSAGE ) ) ) { if ( ( nameDir . exists ( ) ) && ( messageStr . equals ( NAME_NODE_INIT_MESSAGE ) ) ) { log . info ( String . format ( "NameNode<seq2seq4repair_space>data<seq2seq4repair_space>directory<seq2seq4repair_space>%s<seq2seq4repair_space>already<seq2seq4repair_space>exists,<seq2seq4repair_space>not<seq2seq4repair_space>formatting" , nameDir ) ) ; } else { <START_BUG> FileUtils . deleteFile ( nameDir ) ; <END_BUG> if ( ! ( nameDir . mkdirs ( ) ) ) { final String errorMsg = "unable<seq2seq4repair_space>to<seq2seq4repair_space>make<seq2seq4repair_space>directory:<seq2seq4repair_space>" + nameDir ; log . error ( errorMsg ) ; throw new ExecutorException ( errorMsg ) ; } runCommand ( driver , nameNodeTask , ( "bin//hdfs-mesos-namenode<seq2seq4repair_space>" + messageStr ) ) ; } startProcess ( driver , nameNodeTask ) ; startProcess ( driver , zkfcNodeTask ) ; driver . sendStatusUpdate ( TaskStatus . newBuilder ( ) . setTaskId ( nameNodeTask . getTaskInfo ( ) . getTaskId ( ) ) . setState ( TASK_RUNNING ) . setMessage ( messageStr ) . build ( ) ) ; } } }

Fix:
FileUtils . deleteDirectory ( nameDir ) ;
Buggy code:
public class TestPersistence extends TestCase { private EntityManagerFactory emf ; public void setUp ( ) { <START_BUG> Map props = new HashMap ( ) ; <END_BUG> props . put ( "openjpa.MetaDataFactory" , ( ( "jpa(Types=" + ( AllFieldTypes . class . getName ( ) ) ) + ")" ) ) ; emf = Persistence . createEntityManagerFactory ( "test" , props ) ; } public void tearDown ( ) { } public void testCreateEntityManager ( ) { } public void testPersist ( ) { } public void testQuery ( ) { } public static void main ( String [ ] args ) { } }

Fix:
Map props = new HashMap ( System . getProperties ( ) ) ;
Buggy code:
public class PlainJUnitResultFormatter implements JUnitResultFormatter { private NumberFormat nf = NumberFormat . getInstance ( ) ; private Hashtable testStarts = new Hashtable ( ) ; private OutputStream out ; private StringWriter inner ; private PrintWriter wri ; private Hashtable failed = new Hashtable ( ) ; private String systemOutput = null ; private String systemError = null ; public PlainJUnitResultFormatter ( ) { } public void setOutput ( OutputStream out ) { } public void setSystemOutput ( String out ) { } public void setSystemError ( String err ) { } public void startTestSuite ( JUnitTest suite ) { } public void endTestSuite ( JUnitTest suite ) throws BuildException { } public void startTest ( Test t ) { } public void endTest ( Test test ) { synchronized ( wri ) { <START_BUG> wri . print ( ( "Testcase:<seq2seq4repair_space>" + ( JUnitVersionHelper . getTestCaseName ( ( ( TestCase ) ( test ) ) ) ) ) ) ; <END_BUG> if ( Boolean . TRUE . equals ( failed . get ( test ) ) ) { return ; } Long l = ( ( Long ) ( testStarts . get ( test ) ) ) ; wri . println ( ( ( "<seq2seq4repair_space>took<seq2seq4repair_space>" + ( nf . format ( ( ( ( System . currentTimeMillis ( ) ) - ( l . longValue ( ) ) ) // 1000.0 ) ) ) ) + "<seq2seq4repair_space>sec" ) ) ; } } public void addFailure ( Test test , Throwable t ) { } public void addFailure ( Test test , AssertionFailedError t ) { } public void addError ( Test test , Throwable t ) { } private void formatError ( String type , Test test , Throwable t ) { } }

Fix:
wri . print ( ( "Testcase:<seq2seq4repair_space>" + ( JUnitVersionHelper . getTestCaseName ( test ) ) ) ) ;
Buggy code:
public class X25Record extends Record { private byte [ ] address ; X25Record ( ) { } Record getObject ( ) { } private static final byte [ ] checkAndConvertAddress ( String address ) { } public X25Record ( Name name , int dclass , long ttl , String address ) { } void rrFromWire ( DNSInput in ) throws IOException { } void rdataFromString ( Tokenizer st , Name origin ) throws IOException { } public String getAddress ( ) { } void rrToWire ( DNSOutput out , Compression c , boolean canonical ) { } String rrToString ( ) { <START_BUG> return byteArrayToString ( address , false ) ; <END_BUG> } }

Fix:
return byteArrayToString ( address , true ) ;
Buggy code:
public class Native2Ascii extends MatchingTask { private boolean reverse = false ; private String encoding = null ; private File srcDir = null ; private File destDir = null ; private String extension = null ; private Mapper mapper ; public void setReverse ( boolean reverse ) { } public void setEncoding ( String encoding ) { } public void setSrc ( File srcDir ) { } public void setDest ( File destDir ) { } public void setExt ( String ext ) { } public Mapper createMapper ( ) throws BuildException { if ( ( mapper ) != null ) { <START_BUG> throw new BuildException ( "Cannot<seq2seq4repair_space>define<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>mapper" , location ) ; <END_BUG> } mapper = new Mapper ( getProject ( ) ) ; return mapper ; } public void execute ( ) throws BuildException { } private void convert ( String srcName , String destName ) throws BuildException { } private class ExtMapper implements FileNameMapper { public void setFrom ( String s ) { } public void setTo ( String s ) { } public String [ ] mapFileName ( String fileName ) { } } }

Fix:
throw new BuildException ( "Cannot<seq2seq4repair_space>define<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>mapper" , getLocation ( ) ) ;
Buggy code:
public class Network { private static final String TAG = Network . class . getSimpleName ( ) ; private static final String POST_FILENAME = "file" ; private static final MediaType MEDIA_TYPE_JPG = MediaType . parse ( "image//jpg" ) ; private static final String ACCEPT_LANGUAGE = "Accept-Language" ; private String userAgent = Config . NETWORK_DEFAULT_USER_AGENT ; private String acceptLanguage = null ; private OkHttpClient okHttpClient ; private static class LazyHolder { private static final Network INSTANCE = new Network ( ) ; } private Network ( ) { } public void cancel ( String TAG ) { } public Network setUserAgent ( String userAgent ) { } public Network setAcceptLanguage ( String acceptLanguage ) { } public static Network getInstance ( ) { } public OkHttpClient getOkHttpClient ( ) { } private Builder getRequestBuilder ( String url ) { } private String verify ( Request request ) throws NetworkException { } public String post ( String url , List < NameValuePair > values ) throws NetworkException { } public String post ( String url , Map < String , String > values ) throws NetworkException { } public String post ( String url , Map < String , String > values , String TAG ) throws NetworkException { } public String get ( String url , List < NameValuePair > values ) throws NetworkException { } public String get ( String url , Map < String , String > values , String TAG ) throws NetworkException { <START_BUG> String urlPath = ( values == null ) ? url : ( url + "?" ) + ( Network . queryEncode ( values ) ) ; <END_BUG> Logger . d ( TAG , "Get<seq2seq4repair_space>url:<seq2seq4repair_space>%s" , urlPath ) ; Request . Builder builder = getRequestBuilder ( urlPath ) ; if ( TAG != null ) { builder . tag ( TAG ) ; } return verify ( builder . build ( ) ) ; } public String get ( String url , Map < String , String > values ) throws NetworkException { } public String get ( String url , String TAG ) throws NetworkException { } public String get ( String url ) throws NetworkException { } public String postFile ( String url , List < NameValuePair > values , File file , String TAG ) throws NetworkException { } public String postFile ( String url , Map < String , String > values , File file ) throws NetworkException { } public static String queryEncode ( Map < String , String > values ) { } }

Fix:
String urlPath = ( ( values == null ) || ( ( values . size ( ) ) == 0 ) ) ? url : ( url + "?" ) + ( Network . queryEncode ( values ) ) ;
Buggy code:
public class OtherProfileActivity extends Activity { private TextView mUserName ; private TextView mRealName ; private TextView mSinceWhen ; private TextView mFollowers ; private TextView mBio ; protected ProgressDialog mDownloadProgress ; boolean mBreak = false ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private class GetProfileInfo extends AsyncTask < Void , Void , String [ ] > { private Context context ; private String address ; private boolean hasExistingSMS ; public GetProfileInfo ( Context context , String address ) { } protected String [ ] doInBackground ( Void ... params ) { } @ Override protected void onPreExecute ( ) { } @ Override protected void onPostExecute ( String [ ] sms ) { } private void _toastAsyncDebugger ( final String status ) { } } private boolean hasBothSMS ( Context context , String address ) { } private void _profileLoadUnitTest ( final String address ) { new Thread ( new Runnable ( ) { @ Override public void run ( ) { try { Thread . sleep ( 5000 ) ; SMSHelpers . _addMessageToInbox ( OtherProfileActivity . this , ( address + ",<seq2seq4repair_space>since<seq2seq4repair_space>Dec<seq2seq4repair_space>1912.<seq2seq4repair_space>Bio:<seq2seq4repair_space>Test.<seq2seq4repair_space>Web:<seq2seq4repair_space>http:////test.com.<seq2seq4repair_space>Location:<seq2seq4repair_space>TEST" ) ) ; SMSHelpers . _addMessageToInbox ( OtherProfileActivity . this , ( ( "Followers:<seq2seq4repair_space>1<seq2seq4repair_space>Following:<seq2seq4repair_space>10<seq2seq4repair_space>Reply<seq2seq4repair_space>w//<seq2seq4repair_space>WHOIS<seq2seq4repair_space>@" + address ) + "<seq2seq4repair_space>to<seq2seq4repair_space>view<seq2seq4repair_space>profile." ) ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } runOnUiThread ( new Runnable ( ) { public void run ( ) { <START_BUG> Toast . makeText ( OtherProfileActivity . this , "Placed<seq2seq4repair_space>text<seq2seq4repair_space>in<seq2seq4repair_space>inbox!" , LENGTH_SHORT ) ; <END_BUG> } } ) ; } } ) . start ( ) ; } }

Fix:
Toast . makeText ( OtherProfileActivity . this , "Placed<seq2seq4repair_space>text<seq2seq4repair_space>in<seq2seq4repair_space>inbox!" , LENGTH_SHORT ) . show ( ) ;
Buggy code:
public class MappingJackson2MessageConverter extends AbstractMessageConverter { private static final boolean jackson23Available = ClassUtils . hasMethod ( ObjectMapper . class , "canDeserialize" , JavaType . class , AtomicReference . class ) ; private ObjectMapper objectMapper = new ObjectMapper ( ) ; private Boolean prettyPrint ; public MappingJackson2MessageConverter ( ) { } public void setObjectMapper ( ObjectMapper objectMapper ) { } public ObjectMapper getObjectMapper ( ) { } public void setPrettyPrint ( boolean prettyPrint ) { } private void configurePrettyPrint ( ) { } @ Override protected boolean canConvertFrom ( Message < ? > message , Class < ? > targetClass ) { } @ Override protected boolean canConvertTo ( Object payload , MessageHeaders headers ) { } @ Override protected boolean supports ( Class < ? > clazz ) { } @ Override public Object convertFromInternal ( Message < ? > message , Class < ? > targetClass ) { } @ Override public Object convertToInternal ( Object payload , MessageHeaders headers ) { try { if ( byte [ ] . class . equals ( getSerializedPayloadClass ( ) ) ) { <START_BUG> ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; <END_BUG> JsonEncoding encoding = getJsonEncoding ( getMimeType ( headers ) ) ; @ SuppressWarnings ( "deprecation" ) JsonGenerator generator = this . objectMapper . getJsonFactory ( ) . createJsonGenerator ( out , encoding ) ; if ( this . objectMapper . isEnabled ( SerializationFeature . INDENT_OUTPUT ) ) { generator . useDefaultPrettyPrinter ( ) ; } this . objectMapper . writeValue ( generator , payload ) ; payload = out . toByteArray ( ) ; } else { Writer writer = new StringWriter ( ) ; this . objectMapper . writeValue ( writer , payload ) ; payload = writer . toString ( ) ; } } catch ( IOException ex ) { throw new MessageConversionException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>write<seq2seq4repair_space>JSON:<seq2seq4repair_space>" + ( ex . getMessage ( ) ) ) , ex ) ; } return payload ; } protected JsonEncoding getJsonEncoding ( MimeType contentType ) { } }

Fix:
ByteArrayOutputStream out = new ByteArrayOutputStream ( 1024 ) ;