nus-yam/ex-repair huggingface dataset:
Buggy code:
public class TwitterSendDirectMesage extends AbstractConnector { private static Log log = LogFactory . getLog ( TwitterSendDirectMesage . class ) ; public static final String USER_ID = "userID" ; public static final String MESSAGE = "message" ; public static final String SCREEN_NAME = "screenName" ; @ Override public void connect ( MessageContext messageContext ) throws ConnectException { try { String userID = TwitterUtils . lookupTemplateParamater ( messageContext , TwitterSendDirectMesage . USER_ID ) ; String screenName = TwitterUtils . lookupTemplateParamater ( messageContext , TwitterSendDirectMesage . SCREEN_NAME ) ; String message = TwitterUtils . lookupTemplateParamater ( messageContext , TwitterSendDirectMesage . MESSAGE ) ; Twitter twitter = new TwitterClientLoader ( messageContext ) . loadApiClient ( ) ; <START_BUG> if ( ( userID != null ) && ( userID . isEmpty ( ) ) ) { <END_BUG> twitter . sendDirectMessage ( Long . parseLong ( userID ) , message ) ; } if ( ( screenName != null ) && ( ! ( screenName . isEmpty ( ) ) ) ) { twitter . sendDirectMessage ( screenName , message ) ; } if ( TwitterSendDirectMesage . log . isDebugEnabled ( ) ) { TwitterSendDirectMesage . log . info ( "sending<seq2seq4repair_space>direct<seq2seq4repair_space>message<seq2seq4repair_space>to<seq2seq4repair_space>user<seq2seq4repair_space>completed!" ) ; } } catch ( Exception e ) { TwitterSendDirectMesage . log . error ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>login<seq2seq4repair_space>user:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) , e ) ; TwitterUtils . storeErrorResponseStatus ( messageContext , e ) ; } } }

Fix:
if ( ( userID != null ) && ( ! ( userID . isEmpty ( ) ) ) ) {
Buggy code:
public class SolarSystem { private ArrayList < Planet > planets ; public SolarSystem ( ) { } public void printPlanetNames ( ) { } public void printPlanetNamesSortedById ( ) { } public ArrayList < Planet > sortPlanetsById ( ) { ArrayList < Planet > planetsClone = new ArrayList < Planet > ( this . planets ) ; planetsClone . sort ( new Comparator < Planet > ( ) { public int compare ( Planet p1 , Planet p2 ) { <START_BUG> if ( ( p1 . orbitID ) > ( p2 . orbitID ) ) { <END_BUG> return 1 ; } else { return - 1 ; } } } ) ; return planetsClone ; } }

Fix:
if ( ( p1 . orbitId ) > ( p2 . orbitId ) ) {
Buggy code:
public class ServerGroupAddHandler implements OperationStepHandler { public static final ServerGroupAddHandler INSTANCE = new ServerGroupAddHandler ( ) ; private ServerGroupAddHandler ( ) { } public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final Resource resource = context . createResource ( EMPTY_ADDRESS ) ; final ModelNode model = resource . getModel ( ) ; for ( AttributeDefinition attr : ServerGroupResourceDefinition . ADD_ATTRIBUTES ) { attr . validateAndSet ( operation , model ) ; } String profile = PROFILE . resolveModelAttribute ( context , model ) . asString ( ) ; try { context . readResourceFromRoot ( PathAddress . pathAddress ( PathElement . pathElement ( PROFILE . getName ( ) , profile ) ) ) ; } catch ( NoSuchElementException e ) { throw new OperationFailedException ( new ModelNode ( ) . set ( DomainControllerMessages . MESSAGES . unknown ( PROFILE . getName ( ) , profile ) ) ) ; } if ( operation . hasDefined ( SOCKET_BINDING_GROUP . getName ( ) ) ) { String socketBindingGroup = SOCKET_BINDING_GROUP . resolveModelAttribute ( context , model ) . asString ( ) ; try { context . readResourceFromRoot ( PathAddress . pathAddress ( PathElement . pathElement ( SOCKET_BINDING_GROUP . getName ( ) , socketBindingGroup ) ) ) ; } catch ( NoSuchElementException e ) { throw new OperationFailedException ( new ModelNode ( ) . set ( DomainControllerMessages . MESSAGES . unknown ( SOCKET_BINDING_GROUP . getName ( ) , socketBindingGroup ) ) ) ; } } <START_BUG> context . completeStep ( ) ; <END_BUG> } protected boolean requiresRuntime ( OperationContext context ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class CSVPrinter { private final Appendable out ; private final CSVFormat format ; private boolean newLine = true ; public CSVPrinter ( final Appendable out , final CSVFormat format ) { } public void println ( ) throws IOException { } public void flush ( ) throws IOException { } public void println ( final Object ... values ) throws IOException { } public void printComment ( final String comment ) throws IOException { } private void print ( final CharSequence value , final int offset , final int len ) throws IOException { <START_BUG> if ( format . isEncapsulating ( ) ) { <END_BUG> printAndEncapsulate ( value , offset , len ) ; } else if ( format . isEscaping ( ) ) { printAndEscape ( value , offset , len ) ; } else { printDelimiter ( ) ; out . append ( value , offset , ( offset + len ) ) ; } } void printDelimiter ( ) throws IOException { } void printAndEscape ( final CharSequence value , final int offset , final int len ) throws IOException { } void printAndEncapsulate ( final CharSequence value , final int offset , final int len ) throws IOException { } public void print ( Object object , final boolean checkForEscape ) throws IOException { } public void print ( final Object value ) throws IOException { } }

Fix:
if ( format . isQuoting ( ) ) {
Buggy code:
@ SupportedAnnotationTypes ( "net.jmhertlein.reflective.annotation.CommandMethod" ) public class CommandMethodProcessor extends AbstractProcessor { private static final String ERR_MSG_VISIBILITY = "CommandMethod-annotated<seq2seq4repair_space>methods<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>public." ; @ Override public boolean process ( Set < ? extends TypeElement > set , RoundEnvironment re ) { } private void checkWellFormedParamList ( ExecutableElement e ) { List < ? extends VariableElement > params = e . getParameters ( ) ; int i = 0 ; for ( VariableElement v : params ) { if ( ( ( isType ( v , "org.bukkit.command.CommandSender" ) ) || ( isType ( v , "org.bukkit.entity.Player" ) ) ) || ( isType ( v , "org.bukkit.command.ConsoleCommandSender" ) ) ) { if ( i != 0 ) { compileError ( v , "CommandSender<seq2seq4repair_space>variable<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>first<seq2seq4repair_space>in<seq2seq4repair_space>parameter<seq2seq4repair_space>list." ) ; } } else if ( isType ( v , getArrayMirrorForName ( "java.lang.String" ) ) ) { if ( i != ( ( params . size ( ) ) - 1 ) ) { compileError ( v , "String[]<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>the<seq2seq4repair_space>last<seq2seq4repair_space>parameter." ) ; } } else { if ( ! ( isAllowedPrimitiveType ( v . asType ( ) ) ) ) { <START_BUG> compileError ( v , ( ( "Cannot<seq2seq4repair_space>automatically<seq2seq4repair_space>convert<seq2seq4repair_space>to<seq2seq4repair_space>non-primitive<seq2seq4repair_space>type<seq2seq4repair_space>\"" + ( v . asType ( ) . toString ( ) ) ) + "\"" ) ) ; <END_BUG> } } i ++ ; } } private TypeMirror getMirrorForName ( String s ) { } private TypeMirror getArrayMirrorForName ( String s ) { } private boolean isType ( VariableElement v , String fqn ) { } private boolean isType ( VariableElement v , TypeMirror type ) { } private boolean isType ( TypeMirror t , String fqn ) { } private void compileError ( Element e , String msg ) { } private boolean isAllowedPrimitiveType ( TypeMirror k ) { } }

Fix:
compileError ( v , ( ( "Cannot<seq2seq4repair_space>automatically<seq2seq4repair_space>convert<seq2seq4repair_space>to<seq2seq4repair_space>type<seq2seq4repair_space>\"" + ( v . asType ( ) . toString ( ) ) ) + "\"" ) ) ;
Buggy code:
public abstract class BranchStatement extends Statement { public char [ ] label ; public BranchLabel targetLabel ; public SubRoutineStatement [ ] subroutines ; public int initStateIndex = - 1 ; public BranchStatement ( char [ ] label , int sourceStart , int sourceEnd ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { if ( ( ( this . bits ) & ( ASTNode . IsReachable ) ) == 0 ) { return ; } int pc = codeStream . position ; if ( ( this . subroutines ) != null ) { for ( int i = 0 , max = this . subroutines . length ; i < max ; i ++ ) { SubRoutineStatement sub = this . subroutines [ i ] ; <START_BUG> boolean didEscape = sub . generateSubRoutineInvocation ( currentScope , codeStream , this . targetLabel ) ; <END_BUG> if ( didEscape ) { codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; SubRoutineStatement . reenterAllExceptionHandlers ( this . subroutines , i , codeStream ) ; if ( ( this . initStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , this . initStateIndex ) ; codeStream . addDefinitelyAssignedVariables ( currentScope , this . initStateIndex ) ; } return ; } } } codeStream . goto_ ( this . targetLabel ) ; codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; SubRoutineStatement . reenterAllExceptionHandlers ( this . subroutines , ( - 1 ) , codeStream ) ; if ( ( this . initStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , this . initStateIndex ) ; codeStream . addDefinitelyAssignedVariables ( currentScope , this . initStateIndex ) ; } } public void resolve ( BlockScope scope ) { } }

Fix:
boolean didEscape = sub . generateSubRoutineInvocation ( currentScope , codeStream , this . targetLabel , this . initStateIndex , null ) ;
Buggy code:
@ Deprecated public class ServerWriteAttributeOperationHandler extends WriteAttributeOperationHandler { private final ParameterValidator resolvedValueValidator ; public ServerWriteAttributeOperationHandler ( ) { } public ServerWriteAttributeOperationHandler ( ParameterValidator valueValidator ) { } public ServerWriteAttributeOperationHandler ( AttributeDefinition attributeDefinition ) { } public ServerWriteAttributeOperationHandler ( ParameterValidator valueValidator , ParameterValidator resolvedValueValidator ) { } @ Override protected void modelChanged ( final OperationContext context , final ModelNode operation , final String attributeName , final ModelNode newValue , final ModelNode currentValue ) throws OperationFailedException { boolean restartRequired = false ; <START_BUG> boolean applyToRuntime = ( context . getType ( ) ) == ( Type . SERVER ) ; <END_BUG> ModelNode resolvedValue = null ; if ( applyToRuntime ) { validateResolvedValue ( attributeName , newValue ) ; resolvedValue = newValue . resolve ( ) ; restartRequired = applyUpdateToRuntime ( context , operation , attributeName , resolvedValue , currentValue ) ; if ( restartRequired ) { context . reloadRequired ( ) ; } } if ( ( ( context . completeStep ( ) ) != ( ResultAction . KEEP ) ) && applyToRuntime ) { ModelNode valueToRestore = currentValue . resolve ( ) ; try { revertUpdateToRuntime ( context , operation , attributeName , valueToRestore , resolvedValue ) ; } catch ( Exception e ) { ROOT_LOGGER . caughtExceptionRevertingOperation ( e , getClass ( ) . getSimpleName ( ) , operation . require ( OP ) . asString ( ) , PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ) ; } if ( restartRequired ) { context . revertReloadRequired ( ) ; } } } protected void validateResolvedValue ( String name , ModelNode value ) throws OperationFailedException { } protected boolean applyUpdateToRuntime ( final OperationContext context , final ModelNode operation , final String attributeName , final ModelNode newValue , final ModelNode currentValue ) throws OperationFailedException { } protected void revertUpdateToRuntime ( final OperationContext context , final ModelNode operation , final String attributeName , final ModelNode valueToRestore , final ModelNode valueToRevert ) throws OperationFailedException { } }

Fix:
boolean applyToRuntime = context . isNormalServer ( ) ;
Buggy code:
public class AgentBase extends lotus . domino . AgentBase { @ Override public Session getSession ( ) { Factory . startup ( ) ; <START_BUG> Factory . initThread ( ) ; <END_BUG> return Factory . fromLotus ( super . getSession ( ) , SCHEMA , null ) ; } public static Session getAgentSession ( ) { } }

Fix:
Factory . initThread ( STRICT_THREAD_CONFIG ) ;
Buggy code:
public class TreeBasedSelectionHelper < T > { private EventHandler < TreeItem . TreeModificationEvent < T > > modificationListener = ( e ) -> treeModified ( e ) ; private AbstractSelectionModelBase < TreeItem < T > > selectionModel ; private TreeView < T > treeView ; public TreeBasedSelectionHelper ( AbstractSelectionModelBase < TreeItem < T > > selectionModel , TreeView < T > tree ) { } protected void treeModified ( TreeItem . TreeModificationEvent < T > event ) { } private void childrenChanged ( TreeItemX < T > source , ListChangeListener . Change < ? extends TreeItem < T > > change ) { } private void selectedItemChanged ( TreeItemX < T > source , ListChangeListener . Change < ? extends TreeItem < T > > c ) { } protected void selectedItemRemoved ( TreeItemX < T > source , ListChangeListener . Change < ? extends TreeItem < T > > c ) { TreeItem < T > newSelectedItem ; if ( c . wasReplaced ( ) ) { newSelectedItem = source ; } else if ( c . wasRemoved ( ) ) { if ( c . getList ( ) . isEmpty ( ) ) { newSelectedItem = source ; } else { <START_BUG> int childIndex = Math . min ( c . getFrom ( ) , c . getList ( ) . size ( ) ) ; <END_BUG> newSelectedItem = c . getList ( ) . get ( childIndex ) ; } } else { throw new IllegalStateException ( ( "expected<seq2seq4repair_space>a<seq2seq4repair_space>remove,<seq2seq4repair_space>but<seq2seq4repair_space>was:<seq2seq4repair_space>" + c ) ) ; } if ( ( newSelectedItem == ( treeView . getRoot ( ) ) ) && ( ! ( treeView . isShowRoot ( ) ) ) ) { newSelectedItem = null ; } selectionModel . select ( newSelectedItem ) ; } private boolean isInSubtree ( TreeItem < T > treeItem ) { } protected void treeItemModified ( TreeItem . TreeModificationEvent < T > event ) { } private void collapsed ( TreeItem . TreeModificationEvent < T > event ) { } private void updateFocus ( TreeItemX < T > source , ListChangeListener . Change < ? extends TreeItem < T > > change ) { } }

Fix:
int childIndex = Math . min ( c . getFrom ( ) , ( ( c . getList ( ) . size ( ) ) - 1 ) ) ;
Buggy code:
public class DataTags { public static String [ ] [ ] blocks ; public static String [ ] [ ] items ; public static String [ ] [ ] entities ; public static String [ ] [ ] generated ; public static Tag init ( String [ ] tag ) { } private static Tag initCustom ( String [ ] tagData ) { } private static Tag initItemList ( String [ ] tagData ) { } private static Tag initItem ( String [ ] tagData ) { } private static Tag initString ( String [ ] tagData ) { } private static Tag initInt ( String [ ] tagData ) { TagInt tag = new TagInt ( tagData [ 0 ] , tagData [ 2 ] ) ; if ( ( tagData . length ) > 3 ) { for ( int i = 3 ; i < ( tagData . length ) ; i ++ ) { String data = tagData [ i ] ; if ( data . startsWith ( "min" ) ) { data = data . substring ( "min=" . length ( ) ) ; tag . setMin ( Integer . parseInt ( data ) ) ; } if ( data . startsWith ( "max" ) ) { data = data . substring ( "max=" . length ( ) ) ; tag . setMax ( Integer . parseInt ( data ) ) ; } if ( data . startsWith ( "labeled" ) ) { data = data . substring ( "labeled=" . length ( ) ) ; String [ ] options = data . split ( ":" ) ; tag . setMin ( Integer . parseInt ( options [ 0 ] ) ) ; <START_BUG> tag . setMin ( Integer . parseInt ( options [ 1 ] ) ) ; <END_BUG> tag . setChoices ( options [ 2 ] ) ; } } } return tag ; } private static Tag initFloat ( String [ ] tagData ) { } public static List < Tag > generateListFrom ( String nbt ) { } private static Tag genTagFromString ( String nbt , boolean list ) { } private static String [ ] genElements ( String nbt ) { } public static ObjectBase getObjectFromTags ( List < Tag > list ) { } }

Fix:
tag . setMax ( Integer . parseInt ( options [ 1 ] ) ) ;
Buggy code:
public class ByteArrayBuf implements ByteBuf { private final byte [ ] data ; private int pos ; private int limit ; public ByteArrayBuf ( byte [ ] data ) { } public byte [ ] array ( ) { } @ Override public int capacity ( ) { } @ Override public int position ( ) { } @ Override public ByteArrayBuf position ( int position ) { } @ Override public int limit ( ) { } @ Override public ByteArrayBuf limit ( int limit ) { } @ Override public ByteArrayBuf clear ( ) { } @ Override public ByteArrayBuf flip ( ) { } @ Override public int read ( ) throws IOException { } @ Override public void read ( byte [ ] b , int off , int len ) throws IOException { } @ Override public String readStringUtf8 ( int len ) throws IOException { } @ Override public void write ( int b ) throws IOException { } @ Override public void write ( byte [ ] b , int off , int len ) throws IOException { } @ Override public void shift ( int position , int length , int distance ) { <START_BUG> System . arraycopy ( data , pos , data , ( position + distance ) , length ) ; <END_BUG> } public void copyTo ( ByteSink out ) throws IOException { } @ Override public void write2 ( int b1 , int b2 ) throws IOException { } @ Override public void write3 ( int b1 , int b2 , int b3 ) throws IOException { } @ Override public void write4 ( int b1 , int b2 , int b3 , int b4 ) throws IOException { } @ Override public void write5 ( int b1 , int b2 , int b3 , int b4 , int b5 ) throws IOException { } @ Override public void write6 ( int b1 , int b2 , int b3 , int b4 , int b5 , int b6 ) throws IOException { } @ Override public void write7 ( int b1 , int b2 , int b3 , int b4 , int b5 , int b6 , int b7 ) throws IOException { } @ Override public void write8 ( int b1 , int b2 , int b3 , int b4 , int b5 , int b6 , int b7 , int b8 ) throws IOException { } }

Fix:
System . arraycopy ( data , position , data , ( position + distance ) , length ) ;
Buggy code:
@ Service public class DatabaseService { @ Autowired private CarParkLoadRepository carParkLoadRepo ; @ Autowired private CarParkRepository carParkRepo ; protected static final Logger LOGGER = Logger . getLogger ( DatabaseService . class ) ; public void fillCarkParkData ( final List < Map < String , Object > > data ) { } protected void fillCarkParkLoadTable ( final List < Map < String , Object > > data ) { } protected CarPark addNewCarPark ( final String name ) { } protected Timestamp parseTimestamp ( final String timestampString ) throws ParseException { } protected Long parseLong ( final String longString ) { if ( DatabaseService . LOGGER . isTraceEnabled ( ) ) { DatabaseService . LOGGER . tracef ( "Entering<seq2seq4repair_space>parseLong:<seq2seq4repair_space>%s" , longString ) ; } Long number = null ; <START_BUG> if ( longString != null ) { <END_BUG> number = Long . parseLong ( longString ) ; } if ( DatabaseService . LOGGER . isTraceEnabled ( ) ) { DatabaseService . LOGGER . tracef ( "Leaving<seq2seq4repair_space>parseLong:<seq2seq4repair_space>%s" , number ) ; } return number ; } }

Fix:
if ( ( longString != null ) && ( ! ( longString . equals ( "" ) ) ) ) {
Buggy code:
public class ServletStompEndpointRegistryTests { private ServletStompEndpointRegistry registry ; private SubProtocolWebSocketHandler webSocketHandler ; private MutableUserQueueSuffixResolver queueSuffixResolver ; @ Before public void setup ( ) { MessageChannel channel = Mockito . mock ( MessageChannel . class ) ; this . webSocketHandler = new SubProtocolWebSocketHandler ( channel ) ; this . queueSuffixResolver = new SimpleUserQueueSuffixResolver ( ) ; TaskScheduler taskScheduler = Mockito . mock ( TaskScheduler . class ) ; <START_BUG> this . registry = new ServletStompEndpointRegistry ( webSocketHandler , queueSuffixResolver , taskScheduler ) ; <END_BUG> } @ Test public void stompProtocolHandler ( ) { } @ Test public void handlerMapping ( ) { } }

Fix:
this . registry = new ServletStompEndpointRegistry ( webSocketHandler , queueSuffixResolver , taskScheduler , false ) ;
Buggy code:
public class DoStatement extends Statement { public Expression condition ; public Statement action ; private BranchLabel breakLabel ; private BranchLabel continueLabel ; int mergedInitStateIndex = - 1 ; public DoStatement ( Expression condition , Statement action , int s , int e ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { if ( ( ( bits ) & ( ASTNode . IsReachable ) ) == 0 ) { return ; } int pc = codeStream . position ; BranchLabel actionLabel = new BranchLabel ( codeStream ) ; if ( ( action ) != null ) actionLabel . tagBits |= BranchLabel . USED ; actionLabel . place ( ) ; breakLabel . initialize ( codeStream ) ; if ( ( continueLabel ) != null ) { continueLabel . initialize ( codeStream ) ; } if ( ( action ) != null ) { action . generateCode ( currentScope , codeStream ) ; } Constant cst = condition . optimizedBooleanConstant ( ) ; boolean isConditionOptimizedFalse = ( cst != ( Constant . NotAConstant ) ) && ( ( cst . booleanValue ( ) ) == false ) ; if ( isConditionOptimizedFalse ) { condition . generateCode ( currentScope , codeStream , false ) ; } else { if ( ( continueLabel ) != null ) { continueLabel . place ( ) ; condition . generateOptimizedBoolean ( currentScope , codeStream , actionLabel , null , true ) ; } } if ( ( mergedInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , mergedInitStateIndex ) ; codeStream . addDefinitelyAssignedVariables ( currentScope , mergedInitStateIndex ) ; } <START_BUG> if ( breakLabel . hasForwardReferences ( ) ) { <END_BUG> breakLabel . place ( ) ; } codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resolve ( BlockScope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( breakLabel . forwardReferenceCount ) > 0 ) {
Buggy code:
@ RunWith ( Arquillian . class ) @ Run ( RunModeType . IN_CONTAINER ) public class StatelessBeanTestCase { @ Deployment public static JavaArchive createDeployment ( ) { } @ Test public void testSLSB ( ) throws Exception { Context ctx = new InitialContext ( ) ; SimpleStatelessSessionLocal localBean = ( ( SimpleStatelessSessionLocal ) ( ctx . lookup ( ( ( ( "java:global//ejb3-slsb-example//" + ( SimpleStatelessSessionBean . class . getSimpleName ( ) ) ) + "!" ) + ( SimpleStatelessSessionLocal . class . getName ( ) ) ) ) ) ) ; String message = "Zzzzzzzz.....!" ; String echo = localBean . echo ( message ) ; <START_BUG> String expectedEcho = ( ( ( SimpleStatelessSessionBean . class . getSimpleName ( ) ) + "#" ) + "Echo<seq2seq4repair_space>" ) + message ; <END_BUG> Assert . assertEquals ( "Unexpected<seq2seq4repair_space>echo<seq2seq4repair_space>message<seq2seq4repair_space>received<seq2seq4repair_space>from<seq2seq4repair_space>stateless<seq2seq4repair_space>bean" , expectedEcho , echo ) ; } }

Fix:
String expectedEcho = ( ( ( ( SimpleStatelessSessionBean . class . getSimpleName ( ) ) + "#" ) + "Echo<seq2seq4repair_space>" ) + message ) + "<seq2seq4repair_space>--<seq2seq4repair_space>(1:Other,<seq2seq4repair_space>2:Other,<seq2seq4repair_space>3:Other)" ;
Buggy code:
public abstract class SingleFragmentActivity extends AppCompatActivity { @ LayoutRes protected int getLayoutResId ( ) { <START_BUG> return layout . fragment_sunset ; <END_BUG> } @ Override protected void onCreate ( Bundle savedInstanceState ) { } protected abstract Fragment createFragment ( ) { } }

Fix:
return layout . activity_fragment ;
Buggy code:
public class Version { private Version ( ) { } public static String id ( ) { <START_BUG> return "4.4-snapshot-20070709-1651" ; <END_BUG> } public static void main ( String [ ] args ) { } }

Fix:
return "4.4-snapshot-20070712-1321" ;
Buggy code:
public class KNearestNeighborClassifierTest extends ClassificationTestBase < BytesRef > { @ Test public void testBasicUsage ( ) throws Exception { <START_BUG> checkCorrectClassification ( new KNearestNeighborClassifier ( 1 ) , new BytesRef ( "technology" ) , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) , categoryFieldName ) ; <END_BUG> } }

Fix:
checkCorrectClassification ( new KNearestNeighborClassifier ( 1 ) , TECHNOLOGY_INPUT , TECHNOLOGY_RESULT , new org . apache . lucene . analysis . MockAnalyzer ( random ( ) ) , categoryFieldName ) ;
Buggy code:
factoryBean = this . beanFactory . getBean ( factoryBeanName ) ; if ( factoryBean == null ) { <START_BUG> throw new org . springframework . beans . factory . BeanCreationException ( mbd . getResourceDescription ( ) , beanName , ( ( "factory-bean<seq2seq4repair_space>'" + factoryBeanName ) + "'<seq2seq4repair_space>(or<seq2seq4repair_space>a<seq2seq4repair_space>BeanPostProcessor<seq2seq4repair_space>involved)<seq2seq4repair_space>returned<seq2seq4repair_space>null" ) ) ; <END_BUG>

Fix:
throw new org . springframework . beans . factory . BeanCreationException ( mbd . getResourceDescription ( ) , beanName , ( ( "factory-bean<seq2seq4repair_space>'" + factoryBeanName ) + "'<seq2seq4repair_space>returned<seq2seq4repair_space>null" ) ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) throws IOException { String fileName = args [ 0 ] . trim ( ) ; Path path = Paths . get ( fileName ) ; Charset charset = Charset . forName ( "UTF-8" ) ; BufferedReader bufferedReader = Files . newBufferedReader ( path , charset ) ; String lineContents ; String allStrings = "" ; while ( ( lineContents = bufferedReader . readLine ( ) ) != null ) { allStrings = allStrings + lineContents ; } int openTagIndex = ( allStrings . indexOf ( '[' ) ) + 1 ; String openTag = allStrings . substring ( 0 , openTagIndex ) ; if ( openTag . contains ( "phpreturn" ) ) { openTag = openTag . replace ( "php" , "php\n" ) ; } int closeTagIndex = allStrings . indexOf ( ']' ) ; String closeTag = allStrings . substring ( closeTagIndex ) ; <START_BUG> String dict = allStrings . substring ( openTagIndex , closeTagIndex ) ; <END_BUG> String [ ] allPairs = dict . split ( "," ) ; LinkedList < String > list = new LinkedList < > ( ) ; for ( String pair : allPairs ) { list . add ( pair ) ; } TreeMap < String , String > map = new TreeMap < > ( ) ; for ( String pair : list ) { String [ ] arr = pair . split ( "=>" ) ; String key = arr [ 0 ] . replace ( "'" , "" ) . trim ( ) ; String val = arr [ 1 ] . replaceAll ( "'" , "" ) . trim ( ) ; map . put ( key , val ) ; } PrintWriter printWriter = new PrintWriter ( Files . newBufferedWriter ( path ) ) ; printWriter . println ( openTag ) ; for ( Map . Entry < String , String > p : map . entrySet ( ) ) { printWriter . println ( ( ( ( ( "<seq2seq4repair_space>'" + ( p . getKey ( ) ) ) + "'<seq2seq4repair_space>=><seq2seq4repair_space>'" ) + ( p . getValue ( ) ) ) + "'," ) ) ; } printWriter . println ( closeTag ) ; printWriter . close ( ) ; } }

Fix:
String dict = allStrings . substring ( openTagIndex , closeTagIndex ) . trim ( ) ;
Buggy code:
public class Twitter3LeggedConsumerServlet extends HttpServlet { private static final long serialVersionUID = 1L ; public void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { String consumerName = "twitter" ; <START_BUG> String restEndpoint = "https:////api.twitter.com//1//statuses//update.xml" ; <END_BUG> List < Parameter > parameters = new ArrayList < Parameter > ( ) ; DateFormat dateFormat = new SimpleDateFormat ( "yyyy//MM//dd<seq2seq4repair_space>HH:mm:ss" ) ; Date date = new Date ( ) ; parameters . add ( new Parameter ( "status" , ( "Test<seq2seq4repair_space>GateIn<seq2seq4repair_space>OAuth<seq2seq4repair_space>with<seq2seq4repair_space>Twitter<seq2seq4repair_space>" + ( dateFormat . format ( date ) ) ) ) ) ; OAuthMessage requestMessage = new OAuthMessage ( OAuthMessage . POST , restEndpoint , parameters ) ; ExoOAuth3LeggedConsumerService oauthService = new ExoOAuth3LeggedConsumerService ( ) ; try { OAuthMessage result = oauthService . send ( consumerName , requestMessage , request , response ) ; ExoOAuthUtils . copyResponse ( result , response ) ; } catch ( Exception e ) { oauthService . handleException ( e , request , response , consumerName ) ; } } }

Fix:
String restEndpoint = "https:////api.twitter.com//1//statuses//update.json" ;
Buggy code:
@ SuppressWarnings ( "rawtypes" ) public final class TableMetadata extends AbstractMetadata { private Class < ? > thisType ; private BeanAccessor pojoAccessor ; private Class < ? extends IQueryableEntity > containerType ; BeanAccessor containerAccessor ; private PartitionTable partition ; private Multimap < String , PartitionFunction > partitionFuncs ; private Entry < PartitionKey , PartitionFunction > [ ] effectPartitionKeys ; private List < ColumnMapping > pkFields ; private final Map < Field , String > fieldToColumn = new IdentityHashMap < Field , String > ( ) ; private final Map < String , String > lowerColumnToFieldName = new HashMap < String , String > ( ) ; TableMetadata ( Class < ? extends IQueryableEntity > clz , AnnotationProvider annos ) { } TableMetadata ( Class < PojoWrapper > varClz , Class < ? > clz , AnnotationProvider annos ) { } protected void initByAnno ( Class < ? > thisType , AnnotationProvider annos ) { } public PartitionTable getPartition ( ) { } synchronized void setPartition ( PartitionTable t ) { } public Class < ? > getThisType ( ) { } public Class < ? extends IQueryableEntity > getContainerType ( ) { } public List < Index > getIndexDefinition ( ) { } public List < Field > getPKField ( ) { } public List < ColumnMapping > getPKFields ( ) { } public void putJavaField ( Field field , ColumnMapping type , String columnName , boolean isPk ) { } public void putIndex ( Field [ ] fields , String comment ) { } public String toString ( ) { } public Entry < PartitionKey , PartitionFunction > [ ] getEffectPartitionKeys ( ) { } private Entry < PartitionKey , PartitionFunction > [ ] withFunction ( PartitionKey [ ] key ) { } private static PartitionFunction < ? > createFunc ( PartitionKey value ) { } public Multimap < String , PartitionFunction > getMinUnitFuncForEachPartitionKey ( ) { } public void addNonMetaModelFieldMapping ( String field , Column column ) { } void setTableName ( String tableName ) { } void setSchema ( String schema ) { } public List < ColumnMapping > getColumns ( ) { } public synchronized void removeNotExistColumns ( OperateTarget db ) throws SQLException { } public IQueryableEntity newInstance ( ) { } public String getName ( ) { } public String getSimpleName ( ) { } public Field getFieldByLowerColumn ( String columnLowercase ) { } public PojoWrapper transfer ( Object p , boolean isQuery ) { } public EntityType getType ( ) { } private List < Class > parents ; public void addParent ( Class < ? > processingClz ) { } public boolean containsMeta ( ITableMetadata type ) { } @ Override public BeanAccessor getContainerAccessor ( ) { } TupleMetadata extendMeta ; TupleMetadata extendContainer ; @ Override public TupleMetadata getExtendsTable ( ) { } @ Override public Collection < ColumnMapping > getExtendedColumns ( ) { <START_BUG> return extendMeta . getColumnSchema ( ) ; <END_BUG> } @ Override public ColumnMapping getExtendedColumnDef ( String field ) { } }

Fix:
return ( extendMeta ) == null ? Collections . EMPTY_LIST : extendMeta . getColumnSchema ( ) ;
Buggy code:
public class TransactionalSpoutCoordinator implements IRichSpout { public static final BigInteger INIT_TXID = new BigInteger ( "1" ) ; public static final String TRANSACTION_BATCH_STREAM_ID = ( TransactionalSpoutCoordinator . class . getName ( ) ) + "//batch" ; public static final String TRANSACTION_COMMIT_STREAM_ID = ( TransactionalSpoutCoordinator . class . getName ( ) ) + "//commit" ; private static final String CURRENT_TX = "currtx" ; private static final String META_DIR = "meta" ; private ITransactionalSpout _spout ; private Coordinator _coordinator ; private TransactionalState _state ; private RotatingTransactionalState _coordinatorState ; Map < BigInteger , TransactionalSpoutCoordinator . TransactionStatus > _activeTx = new HashMap < BigInteger , TransactionalSpoutCoordinator . TransactionStatus > ( ) ; private SpoutOutputCollector _collector ; BigInteger _currTransaction ; int _maxTransactionActive ; TransactionalSpoutCoordinator . StateInitializer _initializer ; public TransactionalSpoutCoordinator ( ITransactionalSpout spout ) { } @ Override public void open ( Map conf , TopologyContext context , SpoutOutputCollector collector ) { <START_BUG> _state = TransactionalState . newCoordinatorState ( conf , ( ( String ) ( conf . get ( TOPOLOGY_TRANSACTIONAL_ID ) ) ) , _spout ) ; <END_BUG> _coordinatorState = new RotatingTransactionalState ( _state , TransactionalSpoutCoordinator . META_DIR , true ) ; _collector = collector ; _coordinator = _spout . getCoordinator ( conf , context ) ; _currTransaction = getStoredCurrTransaction ( _state ) ; _maxTransactionActive = Utils . getInt ( conf . get ( TOPOLOGY_MAX_SPOUT_PENDING ) ) ; _initializer = new TransactionalSpoutCoordinator . StateInitializer ( ) ; } @ Override public void close ( ) { } @ Override public void nextTuple ( ) { } @ Override public void ack ( Object msgId ) { } @ Override public void fail ( Object msgId ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } private void sync ( ) { } @ Override public Map < String , Object > getComponentConfiguration ( ) { } private static enum AttemptStatus { PROCESSING , PROCESSED , COMMITTING ; } private static class TransactionStatus { TransactionAttempt attempt ; TransactionalSpoutCoordinator . AttemptStatus status ; public TransactionStatus ( TransactionAttempt attempt ) { } @ Override public String toString ( ) { } } private static final BigInteger ONE = new BigInteger ( "1" ) ; private BigInteger nextTransactionId ( BigInteger id ) { } private BigInteger getStoredCurrTransaction ( TransactionalState state ) { } private class StateInitializer implements RotatingTransactionalState . StateInitializer { @ Override public Object init ( BigInteger txid , Object lastState ) { } } }

Fix:
_state = TransactionalState . newCoordinatorState ( conf , ( ( String ) ( conf . get ( TOPOLOGY_TRANSACTIONAL_ID ) ) ) , _spout . getComponentConfiguration ( ) ) ;
Buggy code:
public class SpidHttp4ClientFactory implements SpidConnectionClientFactory { private static PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager ( ) ; public HttpClient getClient ( ) { RequestConfig . Builder requestConfigBuilder = RequestConfig . custom ( ) ; requestConfigBuilder . setConnectTimeout ( ConfigHelper . getConnectTimeout ( ) ) . setSocketTimeout ( ConfigHelper . getReadTimeout ( ) ) ; if ( ( ConfigHelper . getProxyInetAddress ( ) ) != null ) { <START_BUG> HttpHost proxy = new HttpHost ( ConfigHelper . getProxyInetAddress ( ) ) ; <END_BUG> requestConfigBuilder . setProxy ( proxy ) ; } RequestConfig requestConfig = requestConfigBuilder . build ( ) ; org . apache . http . client . HttpClient client = HttpClients . custom ( ) . setDefaultRequestConfig ( requestConfig ) . setConnectionManager ( SpidHttp4ClientFactory . connectionManager ) . build ( ) ; HttpClient httpClient = new org . apache . oltu . oauth2 . httpclient4 . HttpClient4 ( client ) ; return httpClient ; } }

Fix:
HttpHost proxy = new HttpHost ( ConfigHelper . getProxyInetAddress ( ) , ConfigHelper . getProxyPort ( ) ) ;
Buggy code:
public class AvEntertainmentParsingProfile extends SiteParsingProfile implements SpecificProfile { private Document downloadDocument ( String url ) { } @ Override public Title scrapeTitle ( ) { } @ Override public OriginalTitle scrapeOriginalTitle ( ) { } @ Override public SortTitle scrapeSortTitle ( ) { } @ Override public Set scrapeSet ( ) { } @ Override public Rating scrapeRating ( ) { } @ Override public Year scrapeYear ( ) { } @ Override public Top250 scrapeTop250 ( ) { } @ Override public Votes scrapeVotes ( ) { } @ Override public Outline scrapeOutline ( ) { } @ Override public Plot scrapePlot ( ) { } @ Override public Tagline scrapeTagline ( ) { } @ Override public Runtime scrapeRuntime ( ) { } @ Override public Thumb [ ] scrapePosters ( ) { } @ Override public Thumb [ ] scrapeFanart ( ) { } @ Override public Thumb [ ] scrapeExtraFanart ( ) { } @ Override public MPAARating scrapeMPAA ( ) { } @ Override public ID scrapeID ( ) { } @ Override public ArrayList < Genre > scrapeGenres ( ) { } @ Override public ArrayList < Actor > scrapeActors ( ) { Elements elements = document . select ( "ul<seq2seq4repair_space>li<seq2seq4repair_space>a[href~=ActressDetail]" ) ; ArrayList < Actor > list = new ArrayList < > ( ) ; if ( elements != null ) { for ( Element element : elements ) { String href = element . attr ( "href" ) ; <START_BUG> String name = WordUtils . capitalize ( element . childNode ( 0 ) . toString ( ) ) ; <END_BUG> Thumb thumb = null ; try { Document actorDoc = Jsoup . connect ( href ) . userAgent ( "Mozilla" ) . ignoreHttpErrors ( true ) . timeout ( 0 ) . get ( ) ; Element first = actorDoc . select ( "ul<seq2seq4repair_space>img[src~=ActressImage]" ) . first ( ) ; if ( first != null ) { String thumbURL = first . attr ( "src" ) ; thumb = new Thumb ( thumbURL ) ; } list . add ( new Actor ( name , null , thumb ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } } return list ; } @ Override public ArrayList < Director > scrapeDirectors ( ) { } @ Override public Studio scrapeStudio ( ) { } private String getMovieData ( String category , String japaneseWordForCategory ) { } @ Override public String createSearchString ( File file ) { } @ Override public SearchResult [ ] getSearchResults ( String searchString ) throws IOException { } private String getSearchString ( String id ) { } private String getSearchStringPPV ( String id ) { } @ Override public String getParserName ( ) { } @ Override public SiteParsingProfile newInstance ( ) { } }

Fix:
String name = WordUtils . capitalize ( element . text ( ) ) ;
Buggy code:
public class BasePage extends WebPage { private static final long serialVersionUID = 1L ; private Border border ; public BasePage ( ) { } public final MarkupContainer add ( final Component child ) { } private boolean borderMustBeInitialized ( ) { } private void initializeBorder ( ) { } private void addToBorder ( final Component child ) { <START_BUG> border . addToBorderBody ( child ) ; <END_BUG> } }

Fix:
border . addToBody ( child ) ;
Buggy code:
public class ImapSession { static final boolean isDebuggingEnabled = false ; static final String mailHost = "mail.smartmobili.com" ; static final String imapProtocol = "imap" ; public static Store imapConnect ( HttpSession httpSession ) { Store store = null ; try { Properties props = new Properties ( ) ; <START_BUG> final Session imapSession = Session . getDefaultInstance ( props ) ; <END_BUG> imapSession . setDebug ( ImapSession . isDebuggingEnabled ) ; store = imapSession . getStore ( ImapSession . imapProtocol ) ; store . connect ( ImapSession . mailHost , ( ( String ) ( httpSession . getAttribute ( "authenticationUserName" ) ) ) , ( ( String ) ( httpSession . getAttribute ( "authenticationPassword" ) ) ) ) ; return store ; } catch ( MessagingException mex ) { if ( store != null ) { try { if ( store . isConnected ( ) ) store . close ( ) ; } catch ( MessagingException e ) { } } return null ; } } }

Fix:
final Session imapSession = Session . getInstance ( props ) ;
Buggy code:
public class WebFragmentParsingDeploymentProcessor implements DeploymentUnitProcessor { public static final long PRIORITY = PARSE_DESCRIPTORS . plus ( 310L ) ; private static final String WEB_FRAGMENT_XML = "META-INF//web-fragment.xml" ; public void processDeployment ( DeploymentUnitContext context ) throws DeploymentUnitProcessingException { WarMetaData warMetaData = context . getAttachment ( ATTACHMENT_KEY ) ; assert warMetaData != null ; Map < String , WebFragmentMetaData > webFragments = warMetaData . getWebFragmentsMetaData ( ) ; if ( webFragments == null ) { webFragments = new HashMap < String , WebFragmentMetaData > ( ) ; warMetaData . setWebFragmentsMetaData ( webFragments ) ; } DeploymentStructure structure = context . getAttachment ( DeploymentStructure . ATTACHMENT_KEY ) ; assert structure != null ; assert ( structure . getEntries ( ) ) != null ; for ( DeploymentStructure . ClassPathEntry resourceRoot : structure . getEntries ( ) ) { if ( resourceRoot . getRoot ( ) . getLowerCaseName ( ) . endsWith ( ".jar" ) ) { VirtualFile webFragment = resourceRoot . getRoot ( ) . getChild ( WebFragmentParsingDeploymentProcessor . WEB_FRAGMENT_XML ) ; if ( ( webFragment . exists ( ) ) && ( webFragment . isFile ( ) ) ) { InputStream is = null ; long time = System . currentTimeMillis ( ) ; try { is = webFragment . openStream ( ) ; final XMLInputFactory inputFactory = XMLInputFactory . newInstance ( ) ; XMLStreamReader xmlReader = inputFactory . createXMLStreamReader ( is ) ; webFragments . put ( resourceRoot . getName ( ) , WebFragmentMetaDataParser . parse ( xmlReader ) ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>" + webFragment ) , e ) ; } finally { <START_BUG> Logger . getLogger ( "org.jboss.web" ) . info ( ( "parse<seq2seq4repair_space>" + ( ( System . currentTimeMillis ( ) ) - time ) ) ) ; <END_BUG> try { if ( is != null ) { is . close ( ) ; } } catch ( IOException e ) { } } } } } } }

Fix:
Logger . getLogger ( "org.jboss.web.WebFragmentParsingDeploymentProcessor" ) . info ( ( ( ( ( "parse<seq2seq4repair_space>" + ( resourceRoot . getName ( ) ) ) + ":<seq2seq4repair_space>" ) + ( ( System . currentTimeMillis ( ) ) - time ) ) + "ms" ) ) ;
Buggy code:
public class StringVisitor implements IrVisitor { private PrintStream out ; public StringVisitor ( PrintStream out ) { } @ Override public void visit ( Function f ) { } @ Override public void visit ( BasicBlock b ) { } @ Override public void visit ( CodePoint c ) { } @ Override public void visit ( BinOp b ) { } @ Override public void visit ( Call c ) { } @ Override public void visit ( Assignment assignment ) { } @ Override public void visit ( SysCall s ) { } @ Override public void visit ( Temporary t ) { } @ Override public void visit ( IntegerLiteral l ) { } @ Override public void visit ( ArrayAccess a ) { } @ Override public void visit ( ArrayAllocation n ) { } @ Override public void visit ( RecordDeclaration r ) { } @ Override public void visit ( RecordAccess r ) { } private int conditionCounter = 0 ; @ Override public void visit ( Branch b ) { } @ Override public void visit ( RecordAllocation a ) { } @ Override public void visit ( Identifier i ) { } @ Override public void visit ( Return r ) { } @ Override public void visit ( RelationalOp r ) { } @ Override public void visit ( Loop l ) { } @ Override public void visit ( ArrayLength a ) { a . getExpression ( ) . accept ( this ) ; <START_BUG> out . println ( ".length" ) ; <END_BUG> } }

Fix:
out . print ( ".length" ) ;
Buggy code:
@ XmlRootElement ( name = "productOption" ) @ XmlAccessorType ( XmlAccessType . FIELD ) public class ProductOptionWrapper extends BaseWrapper implements APIWrapper < ProductOption > { @ XmlElement protected String attributeName ; @ XmlElement protected String label ; @ XmlElement protected Boolean required ; @ XmlElement protected String productOptionType ; @ XmlElement protected String productOptionValidationStrategyType ; @ XmlElement protected String productOptionValidationType ; @ XmlElement ( name = "allowedValue" ) @ XmlElementWrapper ( name = "allowedValues" ) protected List < ProductOptionValueWrapper > allowedValues ; @ XmlElement protected String validationString ; @ Override public void wrapDetails ( ProductOption model , HttpServletRequest request ) { this . attributeName = "productOption." + ( model . getAttributeName ( ) ) ; this . label = model . getLabel ( ) ; this . required = model . getRequired ( ) ; if ( ( model . getType ( ) ) != null ) { this . productOptionType = model . getType ( ) . getType ( ) ; } if ( ( model . getProductOptionValidationStrategyType ( ) ) != null ) { this . productOptionValidationStrategyType = model . getProductOptionValidationStrategyType ( ) . getType ( ) ; } <START_BUG> if ( ( model . getProductOptionValidationStrategyType ( ) ) != null ) { <END_BUG> this . productOptionValidationType = model . getProductOptionValidationType ( ) . getType ( ) ; } this . validationString = model . getValidationString ( ) ; List < ProductOptionValue > optionValues = model . getAllowedValues ( ) ; if ( optionValues != null ) { ArrayList < ProductOptionValueWrapper > allowedValueWrappers = new ArrayList < ProductOptionValueWrapper > ( ) ; for ( ProductOptionValue value : optionValues ) { ProductOptionValueWrapper optionValueWrapper = ( ( ProductOptionValueWrapper ) ( context . getBean ( ProductOptionValueWrapper . class . getName ( ) ) ) ) ; optionValueWrapper . wrapSummary ( value , request ) ; allowedValueWrappers . add ( optionValueWrapper ) ; } this . allowedValues = allowedValueWrappers ; } } @ Override public void wrapSummary ( ProductOption model , HttpServletRequest request ) { } }

Fix:
if ( ( model . getProductOptionValidationType ( ) ) != null ) {
Buggy code:
public abstract class AjaxFormChoiceComponentUpdatingBehavior extends AbstractDefaultAjaxBehavior { private static final long serialVersionUID = 1L ; public AjaxFormChoiceComponentUpdatingBehavior ( ) { } @ Override public void renderHead ( IHeaderResponse response ) { } protected abstract void onUpdate ( AjaxRequestTarget target ) { } protected void onError ( AjaxRequestTarget target , RuntimeException e ) { } @ Override protected void onBind ( ) { } protected final FormComponent < ? > getFormComponent ( ) { } protected final CharSequence getEventHandler ( ) { <START_BUG> return generateCallbackScript ( new AppendingStringBuffer ( "wicketAjaxPost('" ) . append ( getCallbackUrl ( true ) ) . append ( ( ( "',<seq2seq4repair_space>wicketSerializeForm(document.getElementById('" + ( getComponent ( ) . getMarkupId ( ) ) ) + "',false))" ) ) ) ; <END_BUG> } @ Override protected final void respond ( final AjaxRequestTarget target ) { } }

Fix:
return generateCallbackScript ( new AppendingStringBuffer ( "wicketAjaxPost('" ) . append ( getCallbackUrl ( ) ) . append ( ( ( "',<seq2seq4repair_space>wicketSerializeForm(document.getElementById('" + ( getComponent ( ) . getMarkupId ( ) ) ) + "',false))" ) ) ) ;
Buggy code:
public class LogNormalDistribution extends AbstractRealDistribution { public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY = 1.0E-9 ; private static final long serialVersionUID = 20120112 ; private static final double SQRT2PI = FastMath . sqrt ( ( 2 * ( FastMath . PI ) ) ) ; private static final double SQRT2 = FastMath . sqrt ( 2.0 ) ; private final double scale ; private final double shape ; private final double logShapePlusHalfLog2Pi ; private final double solverAbsoluteAccuracy ; public LogNormalDistribution ( ) { } public LogNormalDistribution ( double scale , double shape ) throws NotStrictlyPositiveException { } public LogNormalDistribution ( double scale , double shape , double inverseCumAccuracy ) throws NotStrictlyPositiveException { } public LogNormalDistribution ( RandomGenerator rng , double scale , double shape ) throws NotStrictlyPositiveException { } public LogNormalDistribution ( RandomGenerator rng , double scale , double shape , double inverseCumAccuracy ) throws NotStrictlyPositiveException { } public double getScale ( ) { } public double getShape ( ) { } public double density ( double x ) { } @ Override public double logDensity ( double x ) { } public double cumulativeProbability ( double x ) { } @ Override @ Deprecated public double cumulativeProbability ( double x0 , double x1 ) throws NumberIsTooLargeException { } @ Override public double probability ( double x0 , double x1 ) throws NumberIsTooLargeException { } @ Override protected double getSolverAbsoluteAccuracy ( ) { } public double getNumericalMean ( ) { } public double getNumericalVariance ( ) { final double s = shape ; final double ss = s * s ; <START_BUG> return ( ( FastMath . exp ( ss ) ) - 1 ) * ( FastMath . exp ( ( ( 2 * ( scale ) ) + ss ) ) ) ; <END_BUG> } public double getSupportLowerBound ( ) { } public double getSupportUpperBound ( ) { } public boolean isSupportLowerBoundInclusive ( ) { } public boolean isSupportUpperBoundInclusive ( ) { } public boolean isSupportConnected ( ) { } @ Override public double sample ( ) { } }

Fix:
return ( FastMath . expm1 ( ss ) ) * ( FastMath . exp ( ( ( 2 * ( scale ) ) + ss ) ) ) ;