nus-yam/ex-repair huggingface dataset:
Buggy code:
public class FormBasedXmlQueryDemo extends HttpServlet { private QueryTemplateManager queryTemplateManager ; private CorePlusExtensionsParser xmlParser ; private IndexSearcher searcher ; private Analyzer analyzer = new org . apache . lucene . analysis . standard . StandardAnalyzer ( Version . LUCENE_CURRENT ) ; public FormBasedXmlQueryDemo ( ) { } @ Override public void init ( ServletConfig config ) throws ServletException { } @ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } private void openExampleIndex ( ) throws IOException { RAMDirectory rd = new RAMDirectory ( ) ; <START_BUG> IndexWriterConfig iwConfig = new IndexWriterConfig ( Version . LUCENE_40 , analyzer ) ; <END_BUG> IndexWriter writer = new IndexWriter ( rd , iwConfig ) ; InputStream dataIn = getServletContext ( ) . getResourceAsStream ( "//WEB-INF//data.tsv" ) ; BufferedReader br = new BufferedReader ( new InputStreamReader ( dataIn , IOUtils . CHARSET_UTF_8 ) ) ; String line = br . readLine ( ) ; final FieldType textNoNorms = new FieldType ( TextField . TYPE_STORED ) ; textNoNorms . setOmitNorms ( true ) ; while ( line != null ) { line = line . trim ( ) ; if ( ( line . length ( ) ) > 0 ) { StringTokenizer st = new StringTokenizer ( line , "\t" ) ; Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . Field ( "location" , st . nextToken ( ) , textNoNorms ) ) ; doc . add ( new org . apache . lucene . document . Field ( "salary" , st . nextToken ( ) , textNoNorms ) ) ; doc . add ( new org . apache . lucene . document . Field ( "type" , st . nextToken ( ) , textNoNorms ) ) ; doc . add ( new org . apache . lucene . document . Field ( "description" , st . nextToken ( ) , textNoNorms ) ) ; writer . addDocument ( doc ) ; } line = br . readLine ( ) ; } writer . close ( ) ; IndexReader reader = DirectoryReader . open ( rd ) ; searcher = new IndexSearcher ( reader ) ; } }

Fix:
IndexWriterConfig iwConfig = new IndexWriterConfig ( Version . LUCENE_CURRENT , analyzer ) ;
Buggy code:
public class TestCompositeMap < K , V > extends AbstractTestIterableMap < K , V > { private boolean pass = false ; public TestCompositeMap ( String testName ) { } @ Override public void setUp ( ) throws Exception { } @ Override public CompositeMap < K , V > makeObject ( ) { CompositeMap < K , V > map = new CompositeMap < K , V > ( ) ; map . addComposited ( new HashMap < K , V > ( ) ) ; <START_BUG> map . setMutator ( new EmptyMapMutator ( ) ) ; <END_BUG> return map ; } @ SuppressWarnings ( "unchecked" ) private Map < K , V > buildOne ( ) { } @ SuppressWarnings ( "unchecked" ) public Map < K , V > buildTwo ( ) { } public void testGet ( ) { } @ SuppressWarnings ( "unchecked" ) public void testAddComposited ( ) { } @ SuppressWarnings ( "unchecked" ) public void testRemoveComposited ( ) { } @ SuppressWarnings ( "unchecked" ) public void testRemoveFromUnderlying ( ) { } @ SuppressWarnings ( "unchecked" ) public void testRemoveFromComposited ( ) { } public void testResolveCollision ( ) { } @ SuppressWarnings ( "unchecked" ) public void testPut ( ) { } public void testPutAll ( ) { } @ Override public String getCompatibilityVersion ( ) { } }

Fix:
map . setMutator ( new EmptyMapMutator < K , V > ( ) ) ;
Buggy code:
public class MetricsFactory { private static final Logger logger = LoggerFactory . getLogger ( MetricsFactory . class ) ; private Map < String , Metric > metricsCache = new ConcurrentHashMap < > ( ) ; private ScheduledExecutorService executorService ; private int dumpPeriod ; private DataListener dataListener ; private NumberDataListener numberDataListener ; public MetricsFactory ( int dumpPeriod , int dumpingThreads , DataListener dataListener , NumberDataListener numberDataListener ) { } public Metric getInstance ( String name , int dumpPeriodMs , DataListener dataListener ) { } public Metric getInstance ( String name ) { } public PeriodicMetric getPeriodicInstance ( String name , int periodSeconds ) { <START_BUG> int dataPointsCount = ( TimeConstants . SECONDS_IN_24_HOURS ) // ( Long . valueOf ( periodSeconds ) . intValue ( ) ) ; <END_BUG> return new PeriodicMetric ( name , executorService , numberDataListener , periodSeconds , dataPointsCount ) ; } private Metric instantiate ( String name , int periodDelay , final DataListener dataListener ) { } public void shutdown ( ) { } public DataListener getDataListener ( ) { } }

Fix:
int dataPointsCount = ( TimeConstants . SECONDS_IN_24_HOURS ) // periodSeconds ;
Buggy code:
@ Service public class GestionarVehiculoBusinessImpl implements GestionarVehiculoBusiness { @ Autowired private VehiculoDao vehiculoDao ; @ Override public VehiculoDto getVehiculo ( String placa ) throws BusinessException { Authentication authentication = SecurityContextHolder . getContext ( ) . getAuthentication ( ) ; String currentImei = ( ( com . puridiompe . mpa . rest . security . token . LoginAuthenticationToken ) ( authentication ) ) . getImei ( ) ; String currentUsername = ( ( com . puridiompe . mpa . rest . security . token . LoginAuthenticationToken ) ( authentication ) ) . getName ( ) ; VehiculoDto vehiculoDto = vehiculoDao . getVehiculoByPlaca ( placa ) ; if ( vehiculoDto == null ) { <START_BUG> throw new VehiculoNotFoundException ( "Vehiculo<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>SISTRAN" ) ; <END_BUG> } vehiculoDao . setVehicleConsulted ( currentUsername , placa , currentImei ) ; return vehiculoDto ; } }

Fix:
throw new VehiculoNotFoundException ( "Vehículo<seq2seq4repair_space>no<seq2seq4repair_space>fue<seq2seq4repair_space>encontrado" ) ;
Buggy code:
public class XModeHandler extends HandlerBase { public XModeHandler ( XmlParser parser , String modeName , String path ) { } public Object resolveEntity ( String publicId , String systemId ) { } public void attribute ( String aname , String value , boolean isSpecified ) { } public void doctypeDecl ( String name , String publicId , String systemId ) throws Exception { } public void charData ( char [ ] c , int off , int len ) { } public void startElement ( String tag ) { tag = pushElement ( tag ) ; if ( tag == "WHITESPACE" ) { Log . log ( WARNING , this , ( ( ( path ) + ":<seq2seq4repair_space>WHITESPACE<seq2seq4repair_space>rule<seq2seq4repair_space>" ) + "no<seq2seq4repair_space>longer<seq2seq4repair_space>needed" ) ) ; } else if ( tag == "MODE" ) { mode = jEdit . getMode ( modeName ) ; if ( ( mode ) == null ) { mode = new Mode ( modeName ) ; jEdit . addMode ( mode ) ; } } else if ( tag == "KEYWORDS" ) { keywords = new KeywordMap ( true ) ; } else if ( tag == "RULES" ) { rules = new ParserRuleSet ( lastSetName , mode ) ; rules . setIgnoreCase ( lastIgnoreCase ) ; rules . setHighlightDigits ( lastHighlightDigits ) ; if ( ( lastDigitRE ) != null ) { try { rules . setDigitRegexp ( new RE ( lastDigitRE , ( lastIgnoreCase ? RE . REG_ICASE : 0 ) , RESearchMatcher . RE_SYNTAX_JEDIT ) ) ; } catch ( REException e ) { error ( "regexp" , e ) ; } } if ( ( lastEscape ) != null ) <START_BUG> rules . addRule ( ParserRuleFactory . createEscapeRule ( lastEscape ) ) ; <END_BUG> rules . setDefault ( lastDefaultID ) ; } } public void endElement ( String name ) { } public void startDocument ( ) { } private XmlParser parser ; private String modeName ; private String path ; private TokenMarker marker ; private KeywordMap keywords ; private Mode mode ; private Stack stateStack ; private String propName ; private String propValue ; private Hashtable props ; private String lastStart ; private String lastEnd ; private String lastKeyword ; private String lastSetName ; private String lastEscape ; private String lastDelegateSet ; private ParserRuleSet rules ; private byte lastDefaultID = Token . NULL ; private byte lastTokenID ; private String lastTokenIDString ; private int termChar = - 1 ; private boolean lastNoLineBreak ; private boolean lastNoWordBreak ; private boolean lastAtLineStart ; private boolean lastExcludeMatch ; private boolean lastIgnoreCase = true ; private boolean lastHighlightDigits ; private String lastDigitRE ; private void addKeyword ( String k , byte id ) { } private String pushElement ( String name ) { } private String peekElement ( ) { } private String popElement ( ) { } private void error ( String msg ) { } private void error ( String msg , String subst ) { } private void error ( String msg , Throwable t ) { } private void _error ( String msg ) { } }

Fix:
rules . setEscapeRule ( ParserRuleFactory . createEscapeRule ( lastEscape ) ) ;
Buggy code:
public class ConsoleHandler implements HttpHandler { public static final String CONTEXT = "//console" ; private static final String APPLICATION_OCTET_STREAM = "application//octet-stream" ; private ClassLoader loader = null ; private static Map < String , String > contentTypeMapping = new ConcurrentHashMap < String , String > ( ) ; public ConsoleHandler ( ) { } public ConsoleHandler ( ClassLoader loader ) { } @ Override public void handle ( HttpExchange http ) throws IOException { } private void safeClose ( Closeable close ) { } private String resolveContentType ( String resource ) { } private void respond404 ( HttpExchange http ) throws IOException { } private ClassLoader getLoader ( ) { if ( ( loader ) != null ) return loader ; else <START_BUG> return Thread . currentThread ( ) . getContextClassLoader ( ) ; <END_BUG> } }

Fix:
return ConsoleHandler . class . getClassLoader ( ) ;
Buggy code:
public class Post implements Parcelable { private long postID ; private long userID ; private Post . TYPE postType ; private String itemName ; private float worstPrice ; private float autoPrice ; private String description ; private BitmapDrawable picture ; public static enum TYPE { INTEREST ( 0 ) , REPORT ( 1 ) ; private int value ; private TYPE ( int value ) { } public int getValue ( ) { } public static Post . TYPE fromValue ( int value ) { } } private Post ( Parcel in ) { } private Post ( long postID , long userID , Post . TYPE postType , String itemName , float worstPrice , float autoPrice , String description ) { } public long getUserID ( ) { } public Post . TYPE getPostType ( ) { } public void setPostType ( Post . TYPE postType ) { } public long getPostID ( ) { } public String getItemName ( ) { } public void setItemName ( String itemName ) { } public float getWorstPrice ( ) { } public void setWorstPrice ( float worstPrice ) { } public float getAutoPrice ( ) { } public void setAutoPrice ( float autoPrice ) { } public String getDescription ( ) { } public BitmapDrawable getPicture ( ) { } public void setDescription ( String description ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int describeContents ( ) { } @ Override public void writeToParcel ( Parcel dest , int flags ) { } public static final Parcelable . Creator < Post > CREATOR = new Parcelable . Creator < Post > ( ) { public Post createFromParcel ( Parcel in ) { } public Post [ ] newArray ( int size ) { } } ; public static class CreatePostResult { private Post post ; private Post . CreatePostResult . Result result ; public static enum Result { SUCCESS , INVALID_INPUT , NO_PERMISSION , UNKNOWN ; } private CreatePostResult ( Post . CreatePostResult . Result result ) { } private CreatePostResult ( Post . CreatePostResult . Result result , Post post ) { } public Post . CreatePostResult . Result getResult ( ) { } public Post getPost ( ) { } } public static Post . CreatePostResult createPost ( long userID , Post . TYPE postType , String itemName , float worstPrice , String description ) { <START_BUG> return Post . createPost ( userID , postType , itemName , worstPrice , 0.0F , "" ) ; <END_BUG> } public static Post . CreatePostResult createPost ( long userID , Post . TYPE postType , String itemName , float worstPrice , float autoPrice , String description ) { } public static List < Post > getPostsByUserID ( long userID , List < Post > results ) { } public static void getPostsByUserID ( final long userID , final List < Post > results , final RecyclerView . Adapter adapterToNotify ) { } private static Post fromCursor ( Cursor cursor ) { } }

Fix:
return Post . createPost ( userID , postType , itemName , worstPrice , 0.0F , description ) ;
Buggy code:
public class TryStatement extends Statement { private Block body = null ; private ASTNode . NodeList catchClauses = new ASTNode . NodeList ( true , CatchClause . class ) ; private Block optionalFinallyBody = null ; TryStatement ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { TryStatement result = new TryStatement ( target ) ; result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <START_BUG> result . setLeadingComment ( getLeadingComment ( ) ) ; <END_BUG> result . setBody ( ( ( Block ) ( getBody ( ) . clone ( target ) ) ) ) ; result . catchClauses ( ) . addAll ( ASTNode . copySubtrees ( target , catchClauses ( ) ) ) ; result . setFinally ( ( ( Block ) ( ASTNode . copySubtree ( target , getFinally ( ) ) ) ) ) ; return result ; } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Block getBody ( ) { } public void setBody ( Block body ) { } public List catchClauses ( ) { } public Block getFinally ( ) { } public void setFinally ( Block block ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . copyLeadingComment ( this ) ;
Buggy code:
public class DivideQuestion extends Question { public DivideQuestion ( MyNumber firstExpression , MyNumber secondExpression ) { } public String getAnswer ( ) { } public MyNumber getAnswerMyNum ( ) { } public String questionWithoutAnswer ( ) { } public String getIncorrectAnswer1 ( ) { <START_BUG> int val = ( firstExpression . number ) * ( secondExpression . number ) ; <END_BUG> int comma = ( firstExpression . comma ) + ( secondExpression . comma ) ; return new MyNumber ( val , comma ) . toString ( ) ; } public String getIncorrectAnswer2 ( ) { } public String getIncorrectAnswer3 ( ) { } }

Fix:
int val = ( firstExpression . number ) // ( secondExpression . number ) ;
Buggy code:
public class SuperMethodInvocation extends Expression { public static final ChildPropertyDescriptor QUALIFIER_PROPERTY = new ChildPropertyDescriptor ( SuperMethodInvocation . class , "qualifier" , Name . class , ASTNode . OPTIONAL , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY = new ChildListPropertyDescriptor ( SuperMethodInvocation . class , "typeArguments" , Type . class , ASTNode . NO_CYCLE_RISK ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( SuperMethodInvocation . class , "name" , SimpleName . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; public static final ChildListPropertyDescriptor ARGUMENTS_PROPERTY = new ChildListPropertyDescriptor ( SuperMethodInvocation . class , "arguments" , Expression . class , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS_2_0 ; private static final List PROPERTY_DESCRIPTORS_3_0 ; public static List propertyDescriptors ( int apiLevel ) { } private Name optionalQualifier = null ; private ASTNode . NodeList typeArguments = null ; private SimpleName methodName = null ; private ASTNode . NodeList arguments = new ASTNode . NodeList ( SuperMethodInvocation . ARGUMENTS_PROPERTY ) ; SuperMethodInvocation ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { SuperMethodInvocation result = new SuperMethodInvocation ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setName ( ( ( SimpleName ) ( getName ( ) . clone ( target ) ) ) ) ; result . setQualifier ( ( ( Name ) ( ASTNode . copySubtree ( target , getQualifier ( ) ) ) ) ) ; if ( ( this . ast . apiLevel ) >= ( AST . JLS3 ) ) { result . typeArguments ( ) . addAll ( ASTNode . copySubtrees ( target , typeArguments ( ) ) ) ; } result . arguments ( ) . addAll ( ASTNode . copySubtrees ( target , arguments ( ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Name getQualifier ( ) { } public boolean isResolvedTypeInferredFromExpectedType ( ) { } public void setQualifier ( Name name ) { } public List typeArguments ( ) { } public SimpleName getName ( ) { } public void setName ( SimpleName name ) { } public List arguments ( ) { } public IMethodBinding resolveMethodBinding ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class Zernike { private static double factorial ( int n ) { } private static Complex zernikeMoment ( ZernikePoint [ ] zps , int zpsSize , int n , int m ) { } public static double [ ] zernikeMoments ( byte [ ] img , int imgWidth , int degree , Point2D center , double radius ) { int imgHeight = ( img . length ) // imgWidth ; int zpsSize = ( ( int ) ( ( ( Math . PI ) * radius ) * radius ) ) ; ZernikePoint [ ] zps = new ZernikePoint [ zpsSize ] ; int totalIntensity = 0 ; int i = 0 ; for ( int y0 = 0 ; y0 < imgHeight ; y0 ++ ) { double y = ( y0 - ( center . getY ( ) ) ) // radius ; for ( int x0 = 0 ; x0 < imgWidth ; x0 ++ ) { double x = ( x0 - ( center . getX ( ) ) ) // radius ; double r = Math . hypot ( x , y ) ; if ( r <= 1 ) { int c = ( img [ ( x0 + ( y0 * imgWidth ) ) ] ) & 255 ; if ( c > 0 ) { r = Math . max ( r , 1.0E-9 ) ; Complex z = new Complex ( ( x // r ) , ( y // r ) ) ; <START_BUG> zps [ i ] = new ZernikePoint ( z , c , degree ) ; <END_BUG> totalIntensity += c ; i ++ ; } } } } zpsSize = i ; for ( i = 0 ; i < zpsSize ; i ++ ) zps [ i ] . normalizeIntensity ( totalIntensity ) ; double [ ] zvalues = new double [ ( ( int ) ( ( ( ( 2 * ( Math . pow ( degree , 2 ) ) ) + ( 4 * degree ) ) - ( Math . pow ( ( - 1 ) , degree ) ) ) + 1 ) ) // 8 ] ; i = 0 ; for ( int n = 0 ; n < degree ; n ++ ) { for ( int m = 0 ; m <= n ; m ++ ) { if ( ( ( n - m ) % 2 ) == 0 ) { Complex z = Zernike . zernikeMoment ( zps , zpsSize , n , m ) ; zvalues [ i ] = z . modulus ( ) ; i ++ ; } } } return zvalues ; } public static double [ ] zernikeMoments ( BufferedImage img , int degree , Point2D center , double radius ) { } No newline ; at end ; of file ; }

Fix:
zps [ i ] = new ZernikePoint ( z , r , c , degree ) ;
Buggy code:
public class MenuItem extends Item { Menu parent ; Menu menu ; int id ; int accelerator ; static final int MARGIN_WIDTH = ( OS . IsWin95 ) ? 2 : 1 ; static final int MARGIN_HEIGHT = ( OS . IsWin95 ) ? 2 : 1 ; public MenuItem ( Menu parent , int style ) { } public MenuItem ( Menu parent , int style , int index ) { } MenuItem ( Menu parent , Menu menu , int style , int index ) { } public void addArmListener ( ArmListener listener ) { } public void addHelpListener ( HelpListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } protected void checkSubclass ( ) { } static int checkStyle ( int style ) { } void fillAccel ( ACCEL accel ) { } void fixMenus ( Decorations newParent ) { } public int getAccelerator ( ) { } Rectangle getBounds ( ) { } public boolean getEnabled ( ) { } public Menu getMenu ( ) { } String getNameText ( ) { } public Menu getParent ( ) { } public boolean getSelection ( ) { } public boolean isEnabled ( ) { } void releaseChild ( ) { } void releaseMenu ( ) { } void releaseWidget ( ) { if ( ( menu ) != null ) menu . releaseResources ( ) ; menu = null ; super . releaseWidget ( ) ; <START_BUG> if ( ( accelerator ) != 0 ) { <END_BUG> parent . destroyAccelerators ( ) ; } accelerator = 0 ; display . removeMenuItem ( this ) ; parent = null ; } public void removeArmListener ( ArmListener listener ) { } public void removeHelpListener ( HelpListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } public void setAccelerator ( int accelerator ) { } public void setEnabled ( boolean enabled ) { } public void setImage ( Image image ) { } public void setMenu ( Menu menu ) { } boolean setRadioSelection ( boolean value ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } int widgetStyle ( ) { } LRESULT wmCommandChild ( int wParam , int lParam ) { } LRESULT wmDrawChild ( int wParam , int lParam ) { } LRESULT wmMeasureChild ( int wParam , int lParam ) { } }

Fix:
if ( ( ( accelerator ) != 0 ) && ( ( parent ) != null ) ) {
Buggy code:
public class JGroupsSubsystemXMLWriter implements XMLElementWriter < SubsystemMarshallingContext > { @ Override public void writeContent ( XMLExtendedStreamWriter writer , SubsystemMarshallingContext context ) throws XMLStreamException { <START_BUG> context . startSubsystemElement ( CURRENT . getNamespaceUri ( ) , false ) ; <END_BUG> ModelNode model = context . getModelNode ( ) ; if ( model . isDefined ( ) ) { DEFAULT_STACK . marshallAsAttribute ( model , writer ) ; if ( model . hasDefined ( WILDCARD_PATH . getKey ( ) ) ) { for ( Property property : model . get ( WILDCARD_PATH . getKey ( ) ) . asPropertyList ( ) ) { writer . writeStartElement ( STACK . getLocalName ( ) ) ; writer . writeAttribute ( NAME . getLocalName ( ) , property . getName ( ) ) ; ModelNode stack = property . getValue ( ) ; if ( stack . get ( PATH . getKeyValuePair ( ) ) . isDefined ( ) ) { ModelNode transport = stack . get ( PATH . getKeyValuePair ( ) ) ; writer . writeStartElement ( TRANSPORT . getLocalName ( ) ) ; TYPE . marshallAsAttribute ( transport , writer ) ; SOCKET_BINDING . marshallAsAttribute ( transport , writer ) ; SHARED . marshallAsAttribute ( transport , writer ) ; DIAGNOSTICS_SOCKET_BINDING . marshallAsAttribute ( transport , writer ) ; DEFAULT_EXECUTOR . marshallAsAttribute ( transport , writer ) ; OOB_EXECUTOR . marshallAsAttribute ( transport , writer ) ; TIMER_EXECUTOR . marshallAsAttribute ( transport , writer ) ; THREAD_FACTORY . marshallAsAttribute ( transport , writer ) ; MACHINE . marshallAsAttribute ( transport , writer ) ; RACK . marshallAsAttribute ( transport , writer ) ; SITE . marshallAsAttribute ( transport , writer ) ; JGroupsSubsystemXMLWriter . writeProtocolProperties ( writer , transport ) ; writer . writeEndElement ( ) ; } if ( stack . hasDefined ( ProtocolResourceDefinition . WILDCARD_PATH . getKey ( ) ) ) { for ( Property protocolProperty : StackAddHandler . getOrderedProtocolPropertyList ( stack ) ) { ModelNode protocol = protocolProperty . getValue ( ) ; writer . writeStartElement ( PROTOCOL . getLocalName ( ) ) ; ProtocolResourceDefinition . TYPE . marshallAsAttribute ( protocol , writer ) ; ProtocolResourceDefinition . SOCKET_BINDING . marshallAsAttribute ( protocol , writer ) ; JGroupsSubsystemXMLWriter . writeProtocolProperties ( writer , protocol ) ; writer . writeEndElement ( ) ; } } if ( stack . get ( RelayResourceDefinition . PATH . getKeyValuePair ( ) ) . isDefined ( ) ) { ModelNode relay = stack . get ( RelayResourceDefinition . PATH . getKeyValuePair ( ) ) ; JGroupsSubsystemXMLWriter . writeRelay ( writer , relay ) ; } writer . writeEndElement ( ) ; } } } writer . writeEndElement ( ) ; } private static void writeProtocolProperties ( XMLExtendedStreamWriter writer , ModelNode protocol ) throws XMLStreamException { } private static void writeRelay ( XMLExtendedStreamWriter writer , ModelNode relay ) throws XMLStreamException { } }

Fix:
context . startSubsystemElement ( CURRENT . getUri ( ) , false ) ;
Buggy code:
public class OracleSqlScriptSmallTest { @ Test public void parseSqlStatements ( ) throws Exception { } @ Test public void parseSqlStatementsWithInlineCommentsInsidePlSqlBlocks ( ) throws Exception { } @ Test public void parseFunctionsAndProcedures ( ) throws Exception { } @ Test public void parsePackages ( ) throws Exception { } @ Test public void parseQQuotes ( ) throws Exception { String source = new ClassPathResource ( "migration//dbsupport//oracle//sql//qquote//V1__Q_Quote.sql" , Thread . currentThread ( ) . getContextClassLoader ( ) ) . loadAsString ( "UTF-8" ) ; SqlScript sqlScript = new SqlScript ( source , new OracleDbSupport ( null ) ) ; List < SqlStatement > sqlStatements = sqlScript . getSqlStatements ( ) ; <START_BUG> assertEquals ( 10 , sqlStatements . size ( ) ) ; <END_BUG> } @ Test public void parseCompoundTrigger ( ) throws Exception { } }

Fix:
assertEquals ( 12 , sqlStatements . size ( ) ) ;
Buggy code:
public abstract class Statement extends ASTNode { private String optionalLeadingComment = null ; Statement ( AST ast ) { } public String getLeadingComment ( ) { } public void setLeadingComment ( String comment ) { if ( comment != null ) { char [ ] source = comment . toCharArray ( ) ; <START_BUG> Scanner scanner = new Scanner ( true , true , false , false , false , null , null ) ; <END_BUG> scanner . resetTo ( 0 , source . length ) ; scanner . setSource ( source ) ; try { int token ; boolean onlyOneComment = false ; while ( ( token = scanner . getNextToken ( ) ) != ( TerminalTokens . TokenNameEOF ) ) { switch ( token ) { case TerminalTokens . TokenNameCOMMENT_BLOCK : case TerminalTokens . TokenNameCOMMENT_JAVADOC : case TerminalTokens . TokenNameCOMMENT_LINE : if ( onlyOneComment ) { throw new IllegalArgumentException ( ) ; } onlyOneComment = true ; break ; default : onlyOneComment = false ; } } if ( ! onlyOneComment ) { throw new IllegalArgumentException ( ) ; } } catch ( InvalidInputException e ) { throw new IllegalArgumentException ( ) ; } } modifying ( ) ; this . optionalLeadingComment = comment ; } int memSize ( ) { } }

Fix:
Scanner scanner = this . getAST ( ) . scanner ;
Buggy code:
@ RunWith ( Arquillian . class ) public class RestEasyIntegrationTestCase { static final String DEPLOYMENT_NAME = "resteasy-osgi-client.war" ; @ ArquillianResource public Deployer deployer ; @ Inject public Bundle bundle ; @ Deployment public static JavaArchive createDeployment ( ) { } @ Deployment ( name = RestEasyIntegrationTestCase . DEPLOYMENT_NAME , managed = false , testable = false ) public static WebArchive endpointWar ( ) { } @ Test public void testServiceAccess ( ) throws Exception { } private String getHttpResponse ( String message ) throws IOException , ExecutionException , TimeoutException { <START_BUG> String reqPath = "http:////localhost:8080//resteasy-osgi-client//rest//echo//" + message ; <END_BUG> return HttpRequest . get ( reqPath , 10 , TimeUnit . SECONDS ) ; } }

Fix:
String reqPath = ( ( "http:////" + ( System . getProperty ( "test.bind.address" , "localhost" ) ) ) + ":8080//resteasy-osgi-client//rest//echo//" ) + message ;
Buggy code:
public class TemplateUtils { private static TemplateUtils instance = new TemplateUtils ( ) ; private static final Logger logger = LogManager . getLogger ( TemplateUtils . class . getName ( ) ) ; private TemplateUtils ( ) { } public static TemplateUtils getInstance ( ) { } public String getHtmlTemplate ( ServletContext context , String filePath ) { } @ SuppressWarnings ( "unchecked" ) public String getFieldController ( ServletContext context , String entityType , String key , Class clazz , String label ) { } private String getIdController ( ServletContext context , String key , String label ) { } private String getEnumController ( ServletContext context , String key , Class clazz ) { } public String getBaseObjectController ( ServletContext context , String entityType , String key , Class < ? extends BaseObject > clazz ) { } public String getBooleanController ( ServletContext context , String key ) { } public String getIntegerController ( ServletContext context , String key , String label ) { } public String getBigDecimalController ( ServletContext context , String key , String label ) { } public String getDateController ( ServletContext context , String key ) { } public String getStringController ( ServletContext context , String key , String label ) { } public String getButtonsController ( ServletContext context , String entityType , final String operationType ) { } public String getFieldLabelHtml ( String entityType , String key ) { final String label = getFieldLabel ( entityType , key ) ; <START_BUG> return String . format ( "<label<seq2seq4repair_space>for='%s'<seq2seq4repair_space>class='col-sm-2<seq2seq4repair_space>control-label'<seq2seq4repair_space>id='%s-label'>%s<//label>%n" , ( null == key ? BLStringUtils . EMPTY : key ) , ( null == key ? BLStringUtils . EMPTY : key ) , label ) ; <END_BUG> } public String getFieldLabel ( String entityType , String key ) { } public String getListController ( ServletContext context , String entityType ) { } public String getNgModelNameForField ( String key ) { } }

Fix:
return String . format ( "<label<seq2seq4repair_space>for='%s'<seq2seq4repair_space>class='col-sm-2<seq2seq4repair_space>control-label<seq2seq4repair_space>%s-label'>%s<//label>%n" , ( null == key ? BLStringUtils . EMPTY : key ) , ( null == key ? BLStringUtils . EMPTY : key ) , label ) ;
Buggy code:
@ EnableCaching @ AutoConfigureAfter ( { MetricsConfiguration . class , DatabaseConfiguration . class } ) @ Slf4j public class CacheConfiguration { @ PersistenceContext private EntityManager entityManager ; @ Inject private Environment env ; @ Inject private MetricRegistry metricRegistry ; private CacheManager cacheManager ; @ PreDestroy public void destroy ( ) { } @ Bean public CacheManager cacheManager ( ) { log . debug ( "Starting<seq2seq4repair_space>Ehcache" ) ; cacheManager = net . sf . ehcache . CacheManager . create ( ) ; cacheManager . getConfiguration ( ) . setMaxBytesLocalHeap ( env . getProperty ( "cache.ehcache.maxBytesLocalHeap" , String . class , "16M" ) ) ; <START_BUG> log . debug ( "Registring<seq2seq4repair_space>Ehcache<seq2seq4repair_space>Metrics<seq2seq4repair_space>gauges" ) ; <END_BUG> Set < EntityType < ? > > entities = entityManager . getMetamodel ( ) . getEntities ( ) ; for ( EntityType < ? > entity : entities ) { String name = entity . getName ( ) ; if ( ( name == null ) || ( ( entity . getJavaType ( ) ) != null ) ) { name = entity . getJavaType ( ) . getName ( ) ; } Assert . notNull ( name , "entity<seq2seq4repair_space>cannot<seq2seq4repair_space>exist<seq2seq4repair_space>without<seq2seq4repair_space>a<seq2seq4repair_space>identifier" ) ; Cache cache = cacheManager . getCache ( name ) ; if ( cache != null ) { cache . getCacheConfiguration ( ) . setTimeToLiveSeconds ( env . getProperty ( "cache.timeToLiveSeconds" , Long . class , 3600L ) ) ; Ehcache decoratedCache = InstrumentedEhcache . instrument ( metricRegistry , cache ) ; cacheManager . replaceCacheWithDecoratedCache ( cache , decoratedCache ) ; } } EhCacheCacheManager ehCacheManager = new EhCacheCacheManager ( ) ; ehCacheManager . setCacheManager ( cacheManager ) ; return ehCacheManager ; } }

Fix:
log . debug ( "Registering<seq2seq4repair_space>Ehcache<seq2seq4repair_space>Metrics<seq2seq4repair_space>gauges" ) ;
Buggy code:
public class TrapezoidIntegrator extends UnivariateRealIntegratorImpl { private static final long serialVersionUID = 6963842845860399200L ; private double s ; @ Deprecated public TrapezoidIntegrator ( UnivariateRealFunction f ) { } public TrapezoidIntegrator ( ) { } double stage ( final UnivariateRealFunction f , final double min , final double max , final int n ) throws FunctionEvaluationException { } @ Deprecated public double integrate ( final double min , final double max ) throws IllegalArgumentException , FunctionEvaluationException , MaxIterationsExceededException { } public double integrate ( final UnivariateRealFunction f , final double min , final double max ) throws IllegalArgumentException , FunctionEvaluationException , MaxIterationsExceededException { } protected void verifyIterationCount ( ) throws IllegalArgumentException { super . verifyIterationCount ( ) ; if ( ( maximalIterationCount ) > 64 ) { <START_BUG> throw MathRuntimeException . createIllegalArgumentException ( "invalid<seq2seq4repair_space>iteration<seq2seq4repair_space>limits:<seq2seq4repair_space>min={0},<seq2seq4repair_space>max={1}" , new Object [ ] { 0 , 64 } ) ; <END_BUG> } } }

Fix:
throw MathRuntimeException . createIllegalArgumentException ( "invalid<seq2seq4repair_space>iteration<seq2seq4repair_space>limits:<seq2seq4repair_space>min={0},<seq2seq4repair_space>max={1}" , 0 , 64 ) ;
Buggy code:
public class ASBuilder implements DOMErrorHandler { protected static final String NAMESPACES_FEATURE_ID = "http:////xml.org//sax//features//namespaces" ; protected static final String VALIDATION_FEATURE_ID = "http:////xml.org//sax//features//validation" ; protected static final String SCHEMA_VALIDATION_FEATURE_ID = "http:////apache.org//xml//features//validation//schema" ; protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http:////apache.org//xml//features//validation//schema-full-checking" ; protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING = false ; public static void main ( String [ ] argv ) { if ( ( argv . length ) < 2 ) { ASBuilder . printUsage ( ) ; System . exit ( 1 ) ; } DOMImplementationAS domImpl = ( ( DOMImplementationAS ) ( ASDOMImplementationImpl . getDOMImplementation ( ) ) ) ; DOMASBuilder parser = domImpl . createDOMASBuilder ( ) ; <START_BUG> DOMConfiguration config = parser . getConfig ( ) ; <END_BUG> config . setParameter ( "error-handler" , new ASBuilder ( ) ) ; boolean schemaFullChecking = ASBuilder . DEFAULT_SCHEMA_FULL_CHECKING ; String arg = null ; int i = 0 ; arg = argv [ i ] ; if ( arg . equals ( "-f" ) ) { schemaFullChecking = true ; arg = argv [ ( ++ i ) ] ; } else if ( arg . equals ( "-F" ) ) { schemaFullChecking = false ; arg = argv [ ( ++ i ) ] ; } config . setParameter ( ASBuilder . NAMESPACES_FEATURE_ID , Boolean . TRUE ) ; config . setParameter ( ASBuilder . VALIDATION_FEATURE_ID , Boolean . TRUE ) ; config . setParameter ( ASBuilder . SCHEMA_VALIDATION_FEATURE_ID , Boolean . TRUE ) ; config . setParameter ( ASBuilder . SCHEMA_FULL_CHECKING_FEATURE_ID , ( schemaFullChecking ? Boolean . TRUE : Boolean . FALSE ) ) ; if ( ! ( arg . equals ( "-a" ) ) ) { ASBuilder . printUsage ( ) ; System . exit ( 1 ) ; } i ++ ; Vector asfiles = new Vector ( ) ; while ( ( i < ( argv . length ) ) && ( ! ( ( arg = argv [ i ] ) . startsWith ( "-" ) ) ) ) { asfiles . addElement ( arg ) ; i ++ ; } if ( ( asfiles . size ( ) ) == 0 ) { ASBuilder . printUsage ( ) ; System . exit ( 1 ) ; } Vector ifiles = null ; if ( i < ( argv . length ) ) { if ( ! ( arg . equals ( "-i" ) ) ) { ASBuilder . printUsage ( ) ; System . exit ( 1 ) ; } i ++ ; ifiles = new Vector ( ) ; while ( ( i < ( argv . length ) ) && ( ! ( ( arg = argv [ i ] ) . startsWith ( "-" ) ) ) ) { ifiles . addElement ( arg ) ; i ++ ; } if ( ( ( ifiles . size ( ) ) == 0 ) || ( i != ( argv . length ) ) ) { ASBuilder . printUsage ( ) ; System . exit ( 1 ) ; } } try { ASModel asmodel = null ; for ( i = 0 ; i < ( asfiles . size ( ) ) ; i ++ ) { asmodel = parser . parseASURI ( ( ( String ) ( asfiles . elementAt ( i ) ) ) ) ; parser . setAbstractSchema ( asmodel ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; System . exit ( 1 ) ; } if ( ifiles != null ) { try { for ( i = 0 ; i < ( ifiles . size ( ) ) ; i ++ ) { parser . parseURI ( ( ( String ) ( ifiles . elementAt ( i ) ) ) ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; System . exit ( 1 ) ; } } } private static void printUsage ( ) { } public boolean handleError ( DOMError error ) { } }

Fix:
DOMConfiguration config = parser . getDomConfig ( ) ;
Buggy code:
public class Cookie extends AbstractTestElement implements Serializable { private static final String TAB = "\t" ; private static final String VALUE = "Cookie.value" ; private static final String DOMAIN = "Cookie.domain" ; private static final String EXPIRES = "Cookie.expires" ; private static final String SECURE = "Cookie.secure" ; private static final String PATH = "Cookie.path" ; private static final String PATH_SPECIFIED = "Cookie.path_specified" ; private static final String DOMAIN_SPECIFIED = "Cookie.domain_specified" ; private static final String VERSION = "Cookie.version" ; private static final int DEFAULT_VERSION = 1 ; public Cookie ( ) { } public Cookie ( String name , String value , String domain , String path , boolean secure , long expires ) { } public Cookie ( String name , String value , String domain , String path , boolean secure , long expires , boolean hasPath , boolean hasDomain ) { } public Cookie ( String name , String value , String domain , String path , boolean secure , long expires , boolean hasPath , boolean hasDomain , int version ) { } public void addConfigElement ( ConfigElement config ) { } public synchronized String getValue ( ) { } public synchronized void setValue ( String value ) { } public synchronized String getDomain ( ) { } public synchronized void setDomain ( String domain ) { } public synchronized long getExpires ( ) { } public synchronized long getExpiresMillis ( ) { } public synchronized void setExpires ( long expires ) { } public synchronized boolean getSecure ( ) { } public synchronized void setSecure ( boolean secure ) { } public synchronized String getPath ( ) { } public synchronized void setPath ( String path ) { } public void setPathSpecified ( boolean b ) { } public boolean isPathSpecified ( ) { } public void setDomainSpecified ( boolean b ) { } public boolean isDomainSpecified ( ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( 80 ) ; <END_BUG> sb . append ( getDomain ( ) ) ; sb . append ( Cookie . TAB ) . append ( "TRUE" ) ; sb . append ( Cookie . TAB ) . append ( getPath ( ) ) ; sb . append ( Cookie . TAB ) . append ( JOrphanUtils . booleanToSTRING ( getSecure ( ) ) ) ; sb . append ( Cookie . TAB ) . append ( getExpires ( ) ) ; sb . append ( Cookie . TAB ) . append ( getName ( ) ) ; sb . append ( Cookie . TAB ) . append ( getValue ( ) ) ; return sb . toString ( ) ; } public synchronized int getVersion ( ) { } public synchronized void setVersion ( int version ) { } }

Fix:
StringBuilder sb = new StringBuilder ( 80 ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class ServiceLoaderTestCase { @ Deployment public static Archive < ? > getDeployment ( ) { <START_BUG> return ShrinkWrapUtils . createJavaArchive ( "demos//serviceloader-example.jar" , ServiceLoaderTestCase . class . getPackage ( ) , TestService . class . getPackage ( ) ) ; <END_BUG> } @ Test public void decorateWithServiceLoader ( ) { } }

Fix:
return ShrinkWrapUtils . createJavaArchive ( "demos//serviceloader-example.jar" , ServiceLoaderTestCase . class . getPackage ( ) , TestService . class . getPackage ( ) , ShrinkWrapUtils . class . getPackage ( ) ) ;
Buggy code:
public abstract class AbstractDeploymentUploadHandler implements OperationStepHandler { private static final String [ ] EMPTY = new String [ 0 ] ; private final ContentRepository contentRepository ; protected final AttributeDefinition attribute ; protected AbstractDeploymentUploadHandler ( final ContentRepository contentRepository , final AttributeDefinition attribute ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( ( contentRepository ) != null ) { try { InputStream is = getContentInputStream ( context , operation ) ; try { byte [ ] hash = contentRepository . addContent ( is ) ; context . getResult ( ) . set ( hash ) ; } finally { AbstractDeploymentUploadHandler . safeClose ( is ) ; } } catch ( IOException e ) { throw new OperationFailedException ( new ModelNode ( ) . set ( e . toString ( ) ) ) ; } } <START_BUG> context . completeStep ( ) ; <END_BUG> } protected abstract InputStream getContentInputStream ( OperationContext context , ModelNode operation ) throws OperationFailedException { } private static void safeClose ( InputStream is ) { } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class OptionsDialog extends AbstractWindow { private static final long serialVersionUID = 1L ; public static final List < Func < OptionsDialog , Tab > > PLUGGABLE_TABS = new ArrayList < Func < OptionsDialog , Tab > > ( 0 ) ; private final ImageManager imageManager = ImageManager . get ( ) ; private final UserPreferences _userPreferences ; private final CloseableTabbedPane _tabbedPane ; private final AnalyzerBeansConfiguration _configuration ; private Timer _updateMemoryTimer ; @ Inject protected OptionsDialog ( WindowContext windowContext , AnalyzerBeansConfiguration configuration , UserPreferences userPreferences , DatabaseDriversPanel databaseDriversPanel , ExtensionPackagesPanel extensionPackagesPanel ) { } public void selectDatabaseDriversTab ( ) { } private DCPanel getGeneralTab ( ) { } private DCPanel getQuickAnalysisPanel ( ) { } private DCPanel getNetworkTab ( ) { } private DCPanel getPerformanceTab ( ) { } private DCPanel getMemoryTab ( ) { } @ Override protected boolean onWindowClosing ( ) { } @ Override protected JComponent getWindowContent ( ) { final JButton closeButton = WidgetFactory . createPrimaryButton ( "Close" , ACTION_CLOSE_BRIGHT ) ; closeButton . addActionListener ( new ActionListener ( ) { @ Override public void actionPerformed ( ActionEvent e ) { _userPreferences . save ( ) ; OptionsDialog . this . dispose ( ) ; } } ) ; final DCPanel buttonPanel = DCPanel . flow ( CENTER , closeButton ) ; final DCBannerPanel banner = new DCBannerPanel ( "Options" ) ; _tabbedPane . bindTabTitleToBanner ( banner ) ; final DCPanel panel = new DCPanel ( WidgetUtils . COLOR_ALTERNATIVE_BACKGROUND ) ; panel . setLayout ( new BorderLayout ( ) ) ; panel . add ( banner , BorderLayout . NORTH ) ; panel . add ( _tabbedPane , BorderLayout . CENTER ) ; panel . add ( buttonPanel , BorderLayout . SOUTH ) ; <START_BUG> panel . setPreferredSize ( 500 , 500 ) ; <END_BUG> return panel ; } @ Override protected boolean isWindowResizable ( ) { } @ Override protected boolean isCentered ( ) { } @ Override public String getWindowTitle ( ) { } @ Override public Image getWindowIcon ( ) { } public AnalyzerBeansConfiguration getConfiguration ( ) { } public CloseableTabbedPane getTabbedPane ( ) { } public UserPreferences getUserPreferences ( ) { } }

Fix:
panel . setPreferredSize ( 700 , 500 ) ;
Buggy code:
@ Path ( "//device" ) public class DeviceResource { private static final Logger log = Logger . getLogger ( DeviceResource . class . getName ( ) ) ; @ Inject DAOBean dao ; @ RolesAllowed ( AuthRole . USER ) @ POST @ Path ( "//closeSession" ) public Response closeSession ( CMSMessage cmsMessage , @ Context ServletContext context , @ Context HttpServletRequest req , @ Context HttpServletResponse resp ) throws Exception { User user = ( ( org . votingsystem . web . currency . util . PrincipalVS ) ( req . getUserPrincipal ( ) ) ) . getUser ( ) ; User signer = cmsMessage . getUser ( ) ; if ( ! ( user . getNif ( ) . equals ( signer . getNif ( ) ) ) ) throw new ExceptionVS ( "signer<seq2seq4repair_space>it's<seq2seq4repair_space>not<seq2seq4repair_space>session<seq2seq4repair_space>owner" ) ; MessageDto messageDto = cmsMessage . getSignedContent ( MessageDto . class ) ; if ( ( messageDto . getOperation ( ) ) != ( TypeVS . CLOSE_SESSION ) ) throw new ExceptionVS ( MessageFormat . format ( "bad<seq2seq4repair_space>message<seq2seq4repair_space>type,<seq2seq4repair_space>expected<seq2seq4repair_space>''{0}''<seq2seq4repair_space>found<seq2seq4repair_space>''{1}''" , CLOSE_SESSION , messageDto . getOperation ( ) ) ) ; if ( ! ( messageDto . getHttpSessionId ( ) . equals ( req . getSession ( ) . getId ( ) ) ) ) throw new ExceptionVS ( "bad<seq2seq4repair_space>http<seq2seq4repair_space>session<seq2seq4repair_space>id" ) ; <START_BUG> req . getSession ( ) . invalidate ( ) ; <END_BUG> return Response . ok ( ) . entity ( "" ) . build ( ) ; } @ RolesAllowed ( AuthRole . USER ) @ Path ( "//authenticatedDevice" ) @ GET @ Produces ( MediaType . APPLICATION_JSON ) public Response authenticatedDevice ( @ Context HttpServletRequest req ) throws Exception { } @ Path ( "//id//{id}" ) @ GET @ Produces ( MediaType . APPLICATION_JSON ) public Response getById ( @ PathParam ( "id" ) Long deviceId ) throws Exception { } @ Path ( "//nif//{nif}//list" ) @ GET @ Produces ( MediaType . APPLICATION_JSON ) public Response list ( @ PathParam ( "nif" ) String nifStr ) throws Exception { } @ Path ( "//nif//{nif}//connected" ) @ GET @ Produces ( MediaType . APPLICATION_JSON ) public Response connected ( @ PathParam ( "nif" ) String nifStr ) throws Exception { } @ Path ( "//id//{deviceId}//connected" ) @ GET @ Produces ( MediaType . APPLICATION_JSON ) public Response connectedDevice ( @ PathParam ( "deviceId" ) Long deviceId , @ DefaultValue ( "false" ) @ QueryParam ( "getAllDevicesFromOwner" ) boolean getAllDevicesFromOwner ) throws Exception { } No newline ; at end ; of file ; }

Fix:
req . getSession ( ) . removeAttribute ( USER_KEY ) ;
Buggy code:
public class CookiePanel extends AbstractConfigGui implements ActionListener { private static transient Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String ADD_COMMAND = "Add" ; private static final String DELETE_COMMAND = "Delete" ; private static final String LOAD_COMMAND = "Load" ; private static final String SAVE_COMMAND = "Save" ; private JTable cookieTable ; private PowerTableModel tableModel ; private JCheckBox clearEachIteration ; private static final String clearEachIterationLabel = "clear_cookies_per_iter" ; private static final String [ ] columnNames = new String [ ] { JMeterUtils . getResString ( "name" ) , JMeterUtils . getResString ( "value" ) , JMeterUtils . getResString ( "domain" ) , JMeterUtils . getResString ( "path" ) , JMeterUtils . getResString ( "secure" ) , JMeterUtils . getResString ( "expiration" ) } ; private static final Class [ ] columnClasses = new Class [ ] { String . class , String . class , String . class , String . class , Boolean . class , Long . class } ; private JButton addButton ; private JButton deleteButton ; private JButton loadButton ; private JButton saveButton ; public CookiePanel ( ) { } public String getStaticLabel ( ) { } public void actionPerformed ( ActionEvent e ) { } private void addCookieToTable ( Cookie cookie ) { <START_BUG> tableModel . addRow ( new Object [ ] { cookie . getName ( ) , cookie . getValue ( ) , cookie . getDomain ( ) , cookie . getPath ( ) , new Boolean ( cookie . getSecure ( ) ) , new Long ( cookie . getExpires ( ) ) } ) ; <END_BUG> } public void modifyTestElement ( TestElement cm ) { } private Cookie createCookie ( Object [ ] rowData ) { } private void populateTable ( CookieManager manager ) { } public TestElement createTestElement ( ) { } public void configure ( TestElement el ) { } public void init ( ) { } public JPanel createCookieTablePanel ( ) { } private JButton createButton ( String resName , char mnemonic , String command , boolean enabled ) { } private JPanel createButtonPanel ( ) { } }

Fix:
tableModel . addRow ( new Object [ ] { cookie . getName ( ) , cookie . getValue ( ) , cookie . getDomain ( ) , cookie . getPath ( ) , Boolean . valueOf ( cookie . getSecure ( ) ) , new Long ( cookie . getExpires ( ) ) } ) ;