nus-yam/ex-repair huggingface dataset:
Buggy code:
public class MySinglyList implements List { private Node head ; private Node tail ; private int size ; @ Override public void add ( Object data ) { } @ Override public Object get ( int index ) { } @ Override public int size ( ) { } @ Override public String toString ( ) { } @ Override public void reverse ( ) { } @ Override public void reverseRecursive ( ) { } private void reserve ( Node node ) { } private void remove ( int index ) { Node previous = null ; Node current = this . head ; for ( int i = 1 ; i <= index ; i ++ ) { previous = current ; current = current . getNext ( ) ; } Node next = current . getNext ( ) ; if ( previous == null ) { this . head = next ; } else if ( next == null ) { <START_BUG> this . tail = current ; <END_BUG> this . tail . setNext ( null ) ; } else { previous . setNext ( next ) ; } ( size ) -- ; } @ Override public Iterator < Object > iterator ( ) { } private static class MyListIterator implements Iterator < Object > { MySinglyList list ; Node current ; int index = - 1 ; MyListIterator ( MySinglyList list ) { } @ Override public boolean hasNext ( ) { } @ Override public Object next ( ) { } @ Override public void remove ( ) { } } }

Fix:
this . tail = previous ;
Buggy code:
public class KafkaFeeder { String stream = null ; Integer partion = 0 ; Properties properties ; Properties twitterAuthProperties ; ConfigurationBuilder cb ; FileInputStream fileInputStream ; TwitterStream twitterStream ; static final String TOPIC = "twitterFeed" ; ProducerConfig producerConfig ; Producer < String , byte [ ] > producer ; KeyedMessage < String , byte [ ] > keyedMessage ; Kryo kryo ; ByteArrayOutputStream bs ; ObjectOutputStream ous ; public static void main ( String [ ] args ) { } public KafkaFeeder ( ) { } public void feedKafka ( ) throws Exception { } public void getTwitterStream ( ) throws Exception { cb = new ConfigurationBuilder ( ) ; twitterAuthProperties = new Properties ( ) ; <START_BUG> fileInputStream = new FileInputStream ( new File ( "//Users//aniketalhat//Projects//HelloKafka//src//main//src//main//resources//config.properties" ) ) ; <END_BUG> twitterAuthProperties . load ( fileInputStream ) ; cb . setDebugEnabled ( true ) . setOAuthConsumerKey ( twitterAuthProperties . getProperty ( "consumerKey" ) ) . setOAuthConsumerSecret ( twitterAuthProperties . getProperty ( "consumerSecret" ) ) . setOAuthAccessToken ( twitterAuthProperties . getProperty ( "accessToken" ) ) . setOAuthAccessTokenSecret ( twitterAuthProperties . getProperty ( "accessTokenSecret" ) ) . setHttpConnectionTimeout ( 100000 ) ; twitterStream = new TwitterStreamFactory ( cb . build ( ) ) . getInstance ( ) ; StatusListener listener = new StatusListener ( ) { @ Override public void onStatus ( Status status ) { stream = new String ( status . getText ( ) ) ; System . out . println ( ( ( ( "Partition:<seq2seq4repair_space>" + ( partion ) ) + "<seq2seq4repair_space>Tweet:<seq2seq4repair_space>" ) + ( stream ) ) ) ; try { bs = new ByteArrayOutputStream ( ) ; ous = new ObjectOutputStream ( bs ) ; ous . writeObject ( status ) ; keyedMessage = new KeyedMessage < String , byte [ ] > ( KafkaFeeder . TOPIC , partion . toString ( ) , bs . toByteArray ( ) ) ; ous . flush ( ) ; ous . close ( ) ; producer . send ( keyedMessage ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } @ Override public void onDeletionNotice ( StatusDeletionNotice statusDeletionNotice ) { } @ Override public void onTrackLimitationNotice ( int numberOfLimitedStatuses ) { } @ Override public void onScrubGeo ( long userId , long upToStatusId ) { } @ Override public void onStallWarning ( StallWarning warning ) { } @ Override public void onException ( Exception ex ) { ex . printStackTrace ( ) ; } } ; twitterStream . addListener ( listener ) ; twitterStream . sample ( ) ; } }

Fix:
fileInputStream = new FileInputStream ( new File ( "//Users//aniketalhat//Projects//HelloKafka//src//main//resources//config.properties" ) ) ;
Buggy code:
public class JodaTimeFormattingConfigurer { private String dateStyle ; private String timeStyle ; private String dateTimeStyle ; private boolean useIsoFormat ; public void setDateStyle ( String dateStyle ) { } public void setTimeStyle ( String timeStyle ) { } public void setDateTimeStyle ( String dateTimeStyle ) { } public void setUseIsoFormat ( boolean useIsoFormat ) { } public void installJodaTimeFormatting ( FormatterRegistry formatterRegistry ) { JodaTimeConverters . registerConverters ( formatterRegistry ) ; DateTimeFormatter jodaDateFormatter = getJodaDateFormatter ( ) ; formatterRegistry . addFormatterForFieldType ( LocalDate . class , new ReadablePartialPrinter ( jodaDateFormatter ) , new DateTimeParser ( jodaDateFormatter ) ) ; DateTimeFormatter jodaTimeFormatter = getJodaTimeFormatter ( ) ; formatterRegistry . addFormatterForFieldType ( LocalTime . class , new ReadablePartialPrinter ( jodaTimeFormatter ) , new DateTimeParser ( jodaTimeFormatter ) ) ; DateTimeFormatter jodaDateTimeFormatter = getJodaDateTimeFormatter ( ) ; Parser < DateTime > dateTimeParser = new DateTimeParser ( jodaDateTimeFormatter ) ; formatterRegistry . addFormatterForFieldType ( LocalDateTime . class , new ReadablePartialPrinter ( jodaDateTimeFormatter ) , dateTimeParser ) ; Printer < ReadableInstant > readableInstantPrinter = new ReadableInstantPrinter ( jodaDateTimeFormatter ) ; formatterRegistry . addFormatterForFieldType ( ReadableInstant . class , readableInstantPrinter , dateTimeParser ) ; <START_BUG> formatterRegistry . addFormatterForFieldAnnotation ( new DateTimeFormatAnnotationFormatterFactory ( ) ) ; <END_BUG> } private DateTimeFormatter getJodaDateFormatter ( ) { } private DateTimeFormatter getJodaTimeFormatter ( ) { } private DateTimeFormatter getJodaDateTimeFormatter ( ) { } }

Fix:
formatterRegistry . addFormatterForFieldAnnotation ( new JodaDateTimeFormatAnnotationFormatterFactory ( ) ) ;
Buggy code:
@ RunWith ( Parameterized . class ) public class CSVFileParserTest { private static final File BASE = new File ( "src//test//resources//CSVFileParser" ) ; private final BufferedReader testData ; private final String testName ; public CSVFileParserTest ( final File file ) throws FileNotFoundException { } private String readTestData ( ) throws IOException { } @ Parameters public static Collection < Object [ ] > generateData ( ) { } @ Test public void testCSVFile ( ) throws Exception { } @ Test public void testCSVUrl ( ) throws Exception { String line = readTestData ( ) ; assertNotNull ( "file<seq2seq4repair_space>must<seq2seq4repair_space>contain<seq2seq4repair_space>config<seq2seq4repair_space>line" , line ) ; final String [ ] split = line . split ( "<seq2seq4repair_space>" ) ; assertTrue ( ( ( testName ) + "<seq2seq4repair_space>require<seq2seq4repair_space>1<seq2seq4repair_space>param" ) , ( ( split . length ) >= 1 ) ) ; CSVFormat format = CSVFormat . newFormat ( ',' ) . withQuoteChar ( '"' ) ; boolean checkComments = false ; for ( int i = 1 ; i < ( split . length ) ; i ++ ) { final String option = split [ i ] ; final String [ ] option_parts = option . split ( "=" , 2 ) ; if ( "IgnoreEmpty" . equalsIgnoreCase ( option_parts [ 0 ] ) ) { format = format . withIgnoreEmptyLines ( Boolean . parseBoolean ( option_parts [ 1 ] ) ) ; } else if ( "IgnoreSpaces" . equalsIgnoreCase ( option_parts [ 0 ] ) ) { format = format . withIgnoreSurroundingSpaces ( Boolean . parseBoolean ( option_parts [ 1 ] ) ) ; } else if ( "CommentStart" . equalsIgnoreCase ( option_parts [ 0 ] ) ) { format = format . withCommentStart ( option_parts [ 1 ] . charAt ( 0 ) ) ; } else if ( "CheckComments" . equalsIgnoreCase ( option_parts [ 0 ] ) ) { checkComments = true ; } else { fail ( ( ( ( testName ) + "<seq2seq4repair_space>unexpected<seq2seq4repair_space>option:<seq2seq4repair_space>" ) + option ) ) ; } } line = readTestData ( ) ; assertEquals ( ( ( testName ) + "<seq2seq4repair_space>Expected<seq2seq4repair_space>format<seq2seq4repair_space>" ) , line , format . toString ( ) ) ; <START_BUG> URL resource = ClassLoader . getSystemResource ( ( "CSVFileParser//" + ( split [ 0 ] ) ) ) ; <END_BUG> final CSVParser parser = CSVParser . parse ( resource , Charset . forName ( "UTF-8" ) , format ) ; for ( final CSVRecord record : parser ) { String parsed = record . toString ( ) ; if ( checkComments ) { final String comment = record . getComment ( ) . replace ( "\n" , "\\n" ) ; if ( comment != null ) { parsed += "#" + comment ; } } final int count = record . size ( ) ; assertEquals ( testName , readTestData ( ) , ( ( count + ":" ) + parsed ) ) ; } } }

Fix:
final URL resource = ClassLoader . getSystemResource ( ( "CSVFileParser//" + ( split [ 0 ] ) ) ) ;
Buggy code:
public final class MultiFormatReader implements Reader { private Hashtable hints ; private Vector readers ; public Result decode ( BinaryBitmap image ) throws NotFoundException { } public Result decode ( BinaryBitmap image , Hashtable hints ) throws NotFoundException { } public Result decodeWithState ( BinaryBitmap image ) throws NotFoundException { } public void setHints ( Hashtable hints ) { this . hints = hints ; boolean tryHarder = ( hints != null ) && ( hints . containsKey ( TRY_HARDER ) ) ; Vector formats = ( hints == null ) ? null : ( ( Vector ) ( hints . get ( POSSIBLE_FORMATS ) ) ) ; readers = new Vector ( ) ; if ( formats != null ) { <START_BUG> boolean addOneDReader = ( ( ( ( ( ( ( ( ( ( formats . contains ( UPC_A ) ) || ( formats . contains ( UPC_E ) ) ) || ( formats . contains ( EAN_13 ) ) ) || ( formats . contains ( EAN_8 ) ) ) || ( formats . contains ( CODABAR ) ) ) || ( formats . contains ( CODE_39 ) ) ) || ( formats . contains ( CODE_93 ) ) ) || ( formats . contains ( CODE_128 ) ) ) || ( formats . contains ( ITF ) ) ) || ( formats . contains ( RSS14 ) ) ) || ( formats . contains ( RSS_EXPANDED ) ) ; <END_BUG> if ( addOneDReader && ( ! tryHarder ) ) { readers . addElement ( new MultiFormatOneDReader ( hints ) ) ; } if ( formats . contains ( QR_CODE ) ) { readers . addElement ( new QRCodeReader ( ) ) ; } if ( formats . contains ( DATAMATRIX ) ) { readers . addElement ( new DataMatrixReader ( ) ) ; } if ( formats . contains ( PDF417 ) ) { readers . addElement ( new PDF417Reader ( ) ) ; } if ( addOneDReader && tryHarder ) { readers . addElement ( new MultiFormatOneDReader ( hints ) ) ; } } if ( readers . isEmpty ( ) ) { if ( ! tryHarder ) { readers . addElement ( new MultiFormatOneDReader ( hints ) ) ; } readers . addElement ( new QRCodeReader ( ) ) ; if ( tryHarder ) { readers . addElement ( new MultiFormatOneDReader ( hints ) ) ; } } } public void reset ( ) { } private Result decodeInternal ( BinaryBitmap image ) throws NotFoundException { } }

Fix:
boolean addOneDReader = ( ( ( ( ( ( ( ( ( formats . contains ( UPC_A ) ) || ( formats . contains ( UPC_E ) ) ) || ( formats . contains ( EAN_13 ) ) ) || ( formats . contains ( EAN_8 ) ) ) || ( formats . contains ( CODE_39 ) ) ) || ( formats . contains ( CODE_93 ) ) ) || ( formats . contains ( CODE_128 ) ) ) || ( formats . contains ( ITF ) ) ) || ( formats . contains ( RSS14 ) ) ) || ( formats . contains ( RSS_EXPANDED ) ) ;
Buggy code:
public class FigureAttributes extends Object implements Serializable , Cloneable { private Hashtable fMap ; private static final long serialVersionUID = - 6886355144423666716L ; private int figureAttributesSerializedDataVersion = 1 ; public FigureAttributes ( ) { } public Object get ( String name ) { } public void set ( String name , Object value ) { } public boolean hasDefined ( String name ) { } public Object clone ( ) { } public void read ( StorableInput dr ) throws IOException { } public void write ( StorableOutput dw ) { dw . writeString ( "attributes" ) ; dw . writeInt ( fMap . size ( ) ) ; Enumeration k = fMap . keys ( ) ; while ( k . hasMoreElements ( ) ) { String s = ( ( String ) ( k . nextElement ( ) ) ) ; Object v = fMap . get ( s ) ; dw . writeString ( s ) ; if ( v instanceof String ) { dw . writeString ( "String" ) ; dw . writeString ( ( ( String ) ( v ) ) ) ; } else if ( v instanceof Color ) { FigureAttributes . writeColor ( dw , "Color" , ( ( Color ) ( v ) ) ) ; } else if ( v instanceof Boolean ) { dw . writeString ( "Boolean" ) ; if ( ( ( Boolean ) ( v ) ) . booleanValue ( ) ) { dw . writeString ( "TRUE" ) ; } else { dw . writeString ( "FALSE" ) ; } } else if ( v instanceof Integer ) { dw . writeString ( "Int" ) ; dw . writeInt ( ( ( Integer ) ( v ) ) . intValue ( ) ) ; } else if ( v instanceof Storable ) { dw . writeString ( "Storable" ) ; dw . writeStorable ( ( ( Storable ) ( v ) ) ) ; } else if ( v instanceof JPopupMenu ) { dw . writeString ( POPUP_MENU ) ; } else { <START_BUG> System . out . println ( ( "Unknown<seq2seq4repair_space>attribute:<seq2seq4repair_space>" + v ) ) ; <END_BUG> dw . writeString ( "UNKNOWN" ) ; } } } public static void writeColor ( StorableOutput dw , String colorName , Color color ) { } public static Color readColor ( StorableInput dr ) throws IOException { } }

Fix:
System . err . println ( ( "Unknown<seq2seq4repair_space>attribute:<seq2seq4repair_space>" + v ) ) ;
Buggy code:
public class SpriteResourceBuilder implements ResourceBuilder < Sprite > { private int x ; private int y ; private int width ; private int height ; private ResourceManager < String > resourceManager ; private String textureId ; private String textureAtlasId ; private String regionId ; private AtlasRegion region ; private boolean flip = false ; private boolean flop = false ; public SpriteResourceBuilder x ( int x ) { } public SpriteResourceBuilder y ( int y ) { } public SpriteResourceBuilder width ( int width ) { } public SpriteResourceBuilder height ( int height ) { } public SpriteResourceBuilder flip ( boolean flop , boolean flip ) { } public SpriteResourceBuilder texture ( String textureId ) { } public SpriteResourceBuilder textureAtlas ( String textureAtlasId , String region ) { } public SpriteResourceBuilder ( ResourceManager < String > resourceManager ) { } @ Override public Sprite build ( ) { } @ Override public boolean isVolatile ( ) { <START_BUG> return false ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return true ;
Buggy code:
public class OSGrabber { private final StringBuilder builder ; private boolean isWindows = true ; public OSGrabber ( StringBuilder builder ) { } public void grabData ( ) { <START_BUG> if ( System . getProperty ( "os.arch" ) . contains ( "win" ) ) { <END_BUG> isWindows = true ; } else { isWindows = false ; } grabOSName ( ) ; grabOSVersion ( ) ; grabOSArchitecture ( ) ; } private void grabOSName ( ) { } private void grabOSVersion ( ) { } private void grabOSArchitecture ( ) { } }

Fix:
if ( ( System . getProperty ( "os.name" ) . contains ( "Win" ) ) || ( System . getProperty ( "os.name" ) . contains ( "win" ) ) ) {
Buggy code:
public class SOManager implements ISharedObjectManager { private static final int GUID_SIZE = 20 ; static Trace debug = Trace . create ( "sharedobjectmanager" ) ; SOContainer container = null ; Vector connectors = null ; public SOManager ( SOContainer cont ) { } protected void debug ( String msg ) { } protected void dumpStack ( String msg , Throwable e ) { } protected void addConnector ( ISharedObjectConnector conn ) { } protected boolean removeConnector ( ISharedObjectConnector conn ) { } protected List getConnectors ( ) { } protected Class [ ] getArgTypes ( String [ ] argTypes , Object [ ] args , ClassLoader cl ) throws ClassNotFoundException { } protected ISharedObject createSharedObjectInstance ( final Class newClass , final Class [ ] argTypes , final Object [ ] args ) throws Exception { } protected ISharedObject verifySharedObject ( Object newSharedObject ) { } protected ISharedObject loadSharedObject ( SharedObjectDescription sd ) throws Exception { if ( sd == null ) throw new NullPointerException ( "SharedObjectDescription<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; Object [ ] args = container . getArgsFromProperties ( sd ) ; String [ ] types = container . getArgTypesFromProperties ( sd ) ; ISharedObject res = null ; SharedObjectTypeDescription typeDesc = sd . getTypeDescription ( ) ; String descName = typeDesc . getName ( ) ; if ( descName == null ) { ClassLoader cl = container . getClassLoaderForSharedObject ( sd ) ; final Class newClass = Class . forName ( typeDesc . getClassName ( ) , true , cl ) ; Class [ ] argTypes = getArgTypes ( types , args , cl ) ; res = createSharedObjectInstance ( newClass , argTypes , args ) ; } else { <START_BUG> res = SharedObjectFactory . getDefault ( ) . createSharedObject ( typeDesc , types , args ) ; <END_BUG> } return res ; } public ID [ ] getSharedObjectIDs ( ) { } public ID createSharedObject ( SharedObjectDescription sd ) throws SharedObjectCreateException { } protected ID createNewSharedObjectID ( SharedObjectDescription sd , ISharedObject newObject ) throws IDCreateException { } public ID addSharedObject ( ID sharedObjectID , ISharedObject sharedObject , Map properties ) throws SharedObjectAddException { } public ISharedObject getSharedObject ( ID sharedObjectID ) { } public ISharedObject removeSharedObject ( ID sharedObjectID ) { } public ISharedObjectConnector connectSharedObjects ( ID sharedObjectFrom , ID [ ] sharedObjectsTo ) throws SharedObjectConnectException { } public void disconnectSharedObjects ( ISharedObjectConnector connector ) throws SharedObjectDisconnectException { } protected void dispose ( ) { } public List getSharedObjectConnectors ( ID sharedObjectFrom ) { } public static Class [ ] getClassesForTypes ( String [ ] argTypes , Object [ ] args , ClassLoader cl ) throws ClassNotFoundException { } public void setRemoteAddPolicy ( ISharedObjectPolicy policy ) { } }

Fix:
res = SharedObjectFactory . getDefault ( ) . createSharedObject ( typeDesc , args ) ;
Buggy code:
public final class SignIn extends WicketExamplePage { public SignIn ( ) { } public SignIn ( final PageParameters parameters ) { } public final class SignInForm extends Form { private final ValueMap properties = new ValueMap ( ) ; public SignInForm ( final String id ) { } public final void onSubmit ( ) { SignInSession session = ( ( SignInSession ) ( getSession ( ) ) ) ; if ( session . authenticate ( properties . getString ( "username" ) , properties . getString ( "password" ) ) ) { if ( ! ( continueToOriginalDestination ( ) ) ) { <START_BUG> setResponsePage ( new Home ( PageParameters . NULL ) ) ; <END_BUG> } } else { final String errmsg = getLocalizer ( ) . getString ( "loginError" , this , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>sign<seq2seq4repair_space>you<seq2seq4repair_space>in" ) ; error ( errmsg ) ; } } } }

Fix:
setResponsePage ( getApplication ( ) . getHomePage ( ) ) ;
Buggy code:
public class AvroValidation { static void validateKey ( String key ) throws InvalidRequestException { } static void validateKeyspace ( String keyspace ) throws KeyspaceNotDefinedException { } static String validateColumnFamily ( String keyspace , String columnFamily ) throws InvalidRequestException { } static void validateColumnPath ( String keyspace , ColumnPath cp ) throws InvalidRequestException { } static void validateColumns ( String keyspace , String cfName , byte [ ] superColumnName , Iterable < byte [ ] > columnNames ) throws InvalidRequestException { } static void validateColumnOrSuperColumn ( String keyspace , String cfName , ColumnOrSuperColumn cosc ) throws InvalidRequestException { if ( ( cosc . column ) != null ) <START_BUG> AvroValidation . validateColumnPath ( keyspace , RecordFactory . newColumnPath ( cfName , cosc . super_column . name , cosc . column . name ) ) ; <END_BUG> if ( ( cosc . super_column ) != null ) for ( Column c : cosc . super_column . columns ) AvroValidation . validateColumnPath ( keyspace , RecordFactory . newColumnPath ( cfName , cosc . super_column . name , c . name ) ) ; if ( ( ( cosc . column ) == null ) && ( ( cosc . super_column ) == null ) ) throw ErrorFactory . newInvalidRequestException ( "ColumnOrSuperColumn<seq2seq4repair_space>must<seq2seq4repair_space>have<seq2seq4repair_space>one<seq2seq4repair_space>or<seq2seq4repair_space>both<seq2seq4repair_space>of<seq2seq4repair_space>Column<seq2seq4repair_space>or<seq2seq4repair_space>SuperColumn" ) ; } }

Fix:
AvroValidation . validateColumnPath ( keyspace , RecordFactory . newColumnPath ( cfName , null , cosc . column . name ) ) ;
Buggy code:
public class BlockScope extends Scope { public LocalVariableBinding [ ] locals ; public int localIndex ; public int startIndex ; public int offset ; public int maxOffset ; public BlockScope [ ] shiftScopes ; public Scope [ ] subscopes = new Scope [ 1 ] ; public int subscopeCount = 0 ; public CaseStatement enclosingCase ; public static final VariableBinding [ ] EmulationPathToImplicitThis = new VariableBinding [ ] { } ; public static final VariableBinding [ ] NoEnclosingInstanceInConstructorCall = new VariableBinding [ ] { } ; public static final VariableBinding [ ] NoEnclosingInstanceInStaticContext = new VariableBinding [ ] { } ; public BlockScope ( BlockScope parent ) { } public BlockScope ( BlockScope parent , boolean addToParentScope ) { } public BlockScope ( BlockScope parent , int variableCount ) { } protected BlockScope ( int kind , Scope parent ) { } public final void addAnonymousType ( TypeDeclaration anonymousType , ReferenceBinding superBinding ) { } public final void addLocalType ( TypeDeclaration localType ) { } public final void addLocalVariable ( LocalVariableBinding binding ) { } public void addSubscope ( Scope childScope ) { } public final boolean allowBlankFinalFieldAssignment ( FieldBinding binding ) { } String basicToString ( int tab ) { } private void checkAndSetModifiersForVariable ( LocalVariableBinding varBinding ) { } void computeLocalVariablePositions ( int ilocal , int initOffset , CodeStream codeStream ) { } public void emulateOuterAccess ( LocalVariableBinding outerLocalVariable ) { } public final ReferenceBinding findLocalType ( char [ ] name ) { } public LocalDeclaration [ ] findLocalVariableDeclarations ( int position ) { } public LocalVariableBinding findVariable ( char [ ] variableName ) { } public Binding getBinding ( char [ ] [ ] compoundName , int mask , InvocationSite invocationSite , boolean needResolve ) { } public final Binding getBinding ( char [ ] [ ] compoundName , InvocationSite invocationSite ) { } public VariableBinding [ ] getEmulationPath ( LocalVariableBinding outerLocalVariable ) { } public Object [ ] getEmulationPath ( ReferenceBinding targetEnclosingType , boolean onlyExactMatch , boolean denyEnclosingArgInConstructorCall ) { } public final boolean isDuplicateLocalVariable ( char [ ] name ) { } public int maxShiftedOffset ( ) { } public final boolean needBlankFinalFieldInitializationCheck ( FieldBinding binding ) { } public ProblemReporter problemReporter ( ) { <START_BUG> return outerMostMethodScope ( ) . problemReporter ( ) ; <END_BUG> } public void propagateInnerEmulation ( ReferenceBinding targetType , boolean isEnclosingInstanceSupplied ) { } public TypeDeclaration referenceType ( ) { } public int scopeIndex ( ) { } int startIndex ( ) { } public String toString ( ) { } public String toString ( int tab ) { } }

Fix:
return methodScope ( ) . problemReporter ( ) ;
Buggy code:
public class BlobUpdateableStreamTest extends BaseJDBCTestCase { public BlobUpdateableStreamTest ( String name ) { } public void testUpdateableBlob ( ) throws Exception { } public static Test suite ( ) { <START_BUG> return TestConfiguration . embeddedSuite ( BlobUpdateableStreamTest . class ) ; <END_BUG> } public void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } }

Fix:
return TestConfiguration . defaultSuite ( BlobUpdateableStreamTest . class ) ;
Buggy code:
public class TabItem extends Item { TabFolder parent ; Control control ; String toolTipText ; NSTabViewItem nsItem ; public TabItem ( TabFolder parent , int style ) { } public TabItem ( TabFolder parent , int style , int index ) { } protected void checkSubclass ( ) { } void destroyWidget ( ) { } public Rectangle getBounds ( ) { checkWidget ( ) ; Rectangle result = new Rectangle ( 0 , 0 , 0 , 0 ) ; if ( nsItem . respondsToSelector ( sel_accessibilityAttributeValue_1 ) ) { int posValue = OS . objc_msgSend ( nsItem . id , sel_accessibilityAttributeValue_1 , OS . NSAccessibilityPositionAttribute ( ) ) ; int sizeValue = OS . objc_msgSend ( nsItem . id , sel_accessibilityAttributeValue_1 , OS . NSAccessibilitySizeAttribute ( ) ) ; NSValue val = new NSValue ( posValue ) ; NSPoint pt = val . pointValue ( ) ; NSWindow window = parent . view . window ( ) ; <START_BUG> pt . y = ( window . screen ( ) . frame ( ) . height ) - ( pt . y ) ; <END_BUG> pt = parent . view . convertPoint_fromView_ ( pt , null ) ; pt = window . convertScreenToBase ( pt ) ; result . x = ( ( int ) ( pt . x ) ) ; result . y = ( ( int ) ( pt . y ) ) ; val = new NSValue ( sizeValue ) ; NSSize size = val . sizeValue ( ) ; result . width = ( ( int ) ( size . width ) ) ; result . height = ( ( int ) ( size . height ) ) ; } return result ; } public Control getControl ( ) { } public TabFolder getParent ( ) { } public String getToolTipText ( ) { } void releaseHandle ( ) { } void releaseParent ( ) { } void releaseWidget ( ) { } public void setControl ( Control control ) { } public void setImage ( Image image ) { } public void setText ( String string ) { } public void setToolTipText ( String string ) { } void update ( ) { } }

Fix:
pt . y = ( display . getPrimaryFrame ( ) . height ) - ( pt . y ) ;
Buggy code:
public class TestJPQLMultiSelectTypedResults extends SingleEMFTestCase { private static final int N_ORDERS = 15 ; private static final int N_ITEMS_PER_ORDER = 3 ; private static final String [ ] ORDER_DATES = new String [ ] { "3//12//2008<seq2seq4repair_space>1:00<seq2seq4repair_space>PM" , "10//01//2008<seq2seq4repair_space>1:51<seq2seq4repair_space>AM" , "12//12//2008<seq2seq4repair_space>10:01<seq2seq4repair_space>AM" , "5//21//2009<seq2seq4repair_space>3:23<seq2seq4repair_space>PM" } ; DateFormat df = DateFormat . getDateInstance ( DateFormat . SHORT , Locale . US ) ; public void setUp ( ) throws Exception { <START_BUG> setUp ( CLEAR_TABLES , Order . class , Item . class , Shop . class , Producer . class , Person . class , Foo . class , Bar . class , "openjpa.DynamicEnhancerAgent" , "false" ) ; <END_BUG> populate ( ) ; } public void populate ( ) throws ParseException { } public void tearDown ( ) throws Exception { } public void testMultipleConstructor ( ) { } public void testMultipleConstructorMixWithMultiSelect ( ) { } public void testMultiSelect ( ) throws Exception { } }

Fix:
setUp ( CLEAR_TABLES , Order . class , Item . class , Shop . class , Producer . class , Person . class , Foo . class , Bar . class , "openjpa.DynamicEnhancementAgent" , "false" ) ;
Buggy code:
public class JavaTestSamplerGui extends AbstractSamplerGui { private JavaConfigGui javaPanel = null ; public JavaTestSamplerGui ( ) { } public String getStaticLabel ( ) { <START_BUG> return JMeterUtils . getResString ( "Java<seq2seq4repair_space>Request" ) ; <END_BUG> } private void init ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement sampler ) { } public void configure ( TestElement el ) { } }

Fix:
return JMeterUtils . getResString ( "java_request" ) ;
Buggy code:
public class LoginActivity extends Activity { public static Person person = new Person ( ) ; public static ArrayList < Posts > all_posts ; static ArrayList < Posts > all_good_posts ; static ArrayList < Posts > all_my_posts ; HttpURLConnection connection = null ; DataOutputStream out ; InputStream in ; private Button Login_TurnToRegister ; private Button Login_LoginBtn ; private EditText Login_accounts ; private EditText Login_password ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( loginpage ) ; Login_TurnToRegister = ( ( Button ) ( findViewById ( regist ) ) ) ; Login_LoginBtn = ( ( Button ) ( findViewById ( login ) ) ) ; Login_accounts = ( ( EditText ) ( findViewById ( accounts ) ) ) ; Login_password = ( ( EditText ) ( findViewById ( password ) ) ) ; Login_LoginBtn . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { String account = Login_accounts . getText ( ) . toString ( ) ; String password = Login_password . getText ( ) . toString ( ) ; String currenturl = "http:////115.28.70.78//login" ; <START_BUG> String query = ( ( "account=" + account ) + "&password" ) + password ; <END_BUG> String result = ConnectToUrl ( currenturl , query ) ; if ( result . equals ( "" ) ) { Toast . makeText ( LoginActivity . this , "ÕËºÅ»òÃÜÂë´íÎó" , LENGTH_SHORT ) . show ( ) ; } else { Parser_person ( result ) ; LoadAllAndGoodPosts ( ) ; LoadMyPosts ( ) ; Intent intent = new Intent ( LoginActivity . this , TiebaActivity . class ) ; startActivity ( intent ) ; } } } ) ; Login_TurnToRegister . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent intent = new Intent ( LoginActivity . this , SignupActivity . class ) ; startActivity ( intent ) ; } } ) ; } private String ConnectToUrl ( String url , String content ) { } private void Parser_person ( String xml ) { } private void Parser_allposts ( String xml , int mode ) { } private void LoadAllAndGoodPosts ( ) { } private void LoadMyPosts ( ) { } }

Fix:
String query = ( ( "account=" + account ) + "&password=" ) + password ;
Buggy code:
public class ConfigurationProviderImpl extends MapConfigurationProvider { private static final String RSRC_DEFAULT = "openjpa.xml" ; private static final String RSRC_SPEC = "META-INF//persistence.xml" ; private static final Localizer _loc = Localizer . forPackage ( ConfigurationProviderImpl . class ) ; private ClassLoader _loader = null ; private String _source = null ; public ConfigurationProviderImpl ( ) { } public ClassLoader getClassLoader ( ) { } public boolean load ( PersistenceUnitInfo pinfo ) throws IOException { } public boolean load ( PersistenceUnitInfo pinfo , Map m ) throws IOException { } public boolean load ( String name , String rsrc , Map m ) throws IOException { } @ Override public boolean loadDefaults ( ClassLoader loader ) throws IOException { } private Boolean load ( String name , String rsrc , Map m , ClassLoader loader , boolean explicit ) throws IOException { if ( loader == null ) loader = Thread . currentThread ( ) . getContextClassLoader ( ) ; Enumeration < URL > urls = loader . getResources ( rsrc ) ; if ( ! ( urls . hasMoreElements ( ) ) ) { if ( ! ( rsrc . startsWith ( "META-INF" ) ) ) urls = loader . getResources ( ( "META-INF//" + rsrc ) ) ; if ( ! ( urls . hasMoreElements ( ) ) ) return null ; } ConfigurationProviderImpl . ConfigurationParser parser = new ConfigurationProviderImpl . ConfigurationParser ( m ) ; PersistenceUnitInfo pinfo = parseResources ( parser , urls , name , loader ) ; if ( ( pinfo == null ) || ( ! ( load ( pinfo ) ) ) ) { if ( ! explicit ) return false ; String msg = ( pinfo == null ) ? "missing-xml-config" : "cantload-xml-config" ; <START_BUG> throw new MissingResourceException ( ConfigurationProviderImpl . _loc . get ( msg , rsrc , String . valueOf ( name ) ) , getClass ( ) . getName ( ) , rsrc ) ; <END_BUG> } return true ; } private PersistenceUnitInfo parseResources ( ConfigurationProviderImpl . ConfigurationParser parser , Enumeration < URL > urls , String name , ClassLoader loader ) throws IOException { } @ Override public boolean load ( String rsrc , ClassLoader loader ) throws IOException { } @ Override public boolean load ( File file ) { } @ Override public void setInto ( Configuration conf ) { } static class ConfigurationParser extends XMLMetaDataParser { private final Map _map ; private PersistenceUnitInfoImpl _info = null ; private URL _source = null ; public ConfigurationParser ( Map map ) { } @ Override public void parse ( URL url ) throws IOException { } @ Override public void parse ( File file ) throws IOException { } @ Override protected Object getSchemaSource ( ) { } @ Override protected void reset ( ) { } protected boolean startElement ( String name , Attributes attrs ) throws SAXException { } protected void endElement ( String name ) throws SAXException { } private void startPersistenceUnit ( Attributes attrs ) throws SAXException { } } }

Fix:
throw new MissingResourceException ( ConfigurationProviderImpl . _loc . get ( msg , rsrc , String . valueOf ( name ) ) . getMessage ( ) , getClass ( ) . getName ( ) , rsrc ) ;
Buggy code:
public class ClusterDriver { private ClusterDriver ( ) { } public static void main ( String [ ] args ) throws IOException { } public static void runJob ( String points , String canopies , String output , String measureClassName , double t1 , double t2 ) throws IOException { JobClient client = new JobClient ( ) ; JobConf conf = new JobConf ( ClusterDriver . class ) ; conf . set ( DISTANCE_MEASURE_KEY , measureClassName ) ; conf . set ( T1_KEY , String . valueOf ( t1 ) ) ; conf . set ( T2_KEY , String . valueOf ( t2 ) ) ; conf . set ( CANOPY_PATH_KEY , canopies ) ; conf . setOutputKeyClass ( Text . class ) ; conf . setOutputValueClass ( Text . class ) ; FileInputFormat . setInputPaths ( conf , new Path ( points ) ) ; Path outPath = new Path ( ( output + "//clusters" ) ) ; FileOutputFormat . setOutputPath ( conf , outPath ) ; conf . setMapperClass ( ClusterMapper . class ) ; conf . setReducerClass ( IdentityReducer . class ) ; client . setConf ( conf ) ; <START_BUG> FileSystem dfs = FileSystem . get ( conf ) ; <END_BUG> if ( dfs . exists ( outPath ) ) dfs . delete ( outPath , true ) ; JobClient . runJob ( conf ) ; } }

Fix:
FileSystem dfs = FileSystem . get ( outPath . toUri ( ) , conf ) ;
Buggy code:
public class AttributeMappingRepositoryImpl implements AttributeMappingRepository { public static final EntityMetaData META_DATA = new AttributeMappingMetaData ( ) ; @ Autowired private MetaDataService metaDataService ; @ Autowired private IdGenerator idGenerator ; private CrudRepository repository ; public AttributeMappingRepositoryImpl ( CrudRepository repository ) { } @ Override public List < Entity > upsert ( Collection < AttributeMapping > attributeMappings ) { } private Entity upsert ( AttributeMapping attributeMapping ) { Entity result ; if ( ( attributeMapping . getIdentifier ( ) ) == null ) { attributeMapping . setIdentifier ( idGenerator . generateId ( ) . toString ( ) ) ; result = toAttributeMappingEntity ( attributeMapping ) ; repository . add ( result ) ; } else { result = toAttributeMappingEntity ( attributeMapping ) ; <START_BUG> repository . add ( result ) ; <END_BUG> } return result ; } @ Override public List < AttributeMapping > getAttributeMappings ( List < Entity > attributeMappingEntities , EntityMetaData sourceEntityMetaData , EntityMetaData targetEntityMetaData ) { } private AttributeMapping toAttributeMapping ( Entity attributeMappingEntity , EntityMetaData sourceEntityMetaData , EntityMetaData targetEntityMetaData ) { } private Entity toAttributeMappingEntity ( AttributeMapping attributeMapping ) { } }

Fix:
repository . update ( result ) ;
Buggy code:
public class UnionDatatypeValidator extends AbstractDatatypeValidator { private Locale fLocale = null ; private Vector fBaseValidators = null ; private DatatypeValidator fBaseValidator = null ; private int fValidatorsSize = 0 ; private String fPattern = null ; private Vector fEnumeration = null ; private int fFacetsDefined = 0 ; private boolean fDerivedByUnion = false ; private StringBuffer errorMsg = null ; private RegularExpression fRegex = null ; public UnionDatatypeValidator ( ) throws InvalidDatatypeFacetException { } public UnionDatatypeValidator ( DatatypeValidator base , Hashtable facets , boolean derivedBy ) throws InvalidDatatypeFacetException { } public UnionDatatypeValidator ( Vector base ) { } public Object validate ( String content , Object state ) throws InvalidDatatypeValueException { } public void setLocale ( Locale locale ) { } public Hashtable getFacets ( ) { } public int compare ( String content , String facetValue ) { } public Object clone ( ) throws CloneNotSupportedException { } private void checkContent ( String content , Object state ) throws InvalidDatatypeValueException { } private void checkContent ( String content , Object state , String pattern ) { int index = - 1 ; boolean valid = false ; DatatypeValidator currentDV = null ; <START_BUG> currentDV = ( ( DatatypeValidator ) ( this . fBaseValidators . get ( index ) ) ) ; <END_BUG> if ( valid ) { break ; } { throw new InvalidDatatypeValueException ( "Facet<seq2seq4repair_space>\"Pattern\"<seq2seq4repair_space>can<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>applied<seq2seq4repair_space>to<seq2seq4repair_space>a<seq2seq4repair_space>list<seq2seq4repair_space>datatype" ) ; } } private void setBasetype ( DatatypeValidator base ) { } }

Fix:
currentDV = ( ( DatatypeValidator ) ( this . fBaseValidators . elementAt ( index ) ) ) ;
Buggy code:
public class OpenIntToFieldHashMap < T extends FieldElement < T > > implements Serializable { protected static final byte FREE = 0 ; protected static final byte FULL = 1 ; protected static final byte REMOVED = 2 ; private static final long serialVersionUID = - 9179080286849120720L ; private static final float LOAD_FACTOR = 0.5F ; private static final int DEFAULT_EXPECTED_SIZE = 16 ; private static final int RESIZE_MULTIPLIER = 2 ; private static final int PERTURB_SHIFT = 5 ; private final Field < T > field ; private int [ ] keys ; private T [ ] values ; private byte [ ] states ; private final T missingEntries ; private int size ; private int mask ; private transient int count ; public OpenIntToFieldHashMap ( final Field < T > field ) { } public OpenIntToFieldHashMap ( final Field < T > field , final T missingEntries ) { } public OpenIntToFieldHashMap ( final Field < T > field , final int expectedSize ) { } public OpenIntToFieldHashMap ( final Field < T > field , final int expectedSize , final T missingEntries ) { } public OpenIntToFieldHashMap ( final OpenIntToFieldHashMap < T > source ) { } private static int computeCapacity ( final int expectedSize ) { if ( expectedSize == 0 ) { return 1 ; } <START_BUG> final int capacity = ( ( int ) ( Math . ceil ( ( expectedSize // ( OpenIntToFieldHashMap . LOAD_FACTOR ) ) ) ) ) ; <END_BUG> final int powerOfTwo = Integer . highestOneBit ( capacity ) ; if ( powerOfTwo == capacity ) { return capacity ; } return OpenIntToFieldHashMap . nextPowerOfTwo ( capacity ) ; } private static int nextPowerOfTwo ( final int i ) { } public T get ( final int key ) { } public boolean containsKey ( final int key ) { } public OpenIntToFieldHashMap < T > . Iterator iterator ( ) { } private static int perturb ( final int hash ) { } private int findInsertionIndex ( final int key ) { } private static int findInsertionIndex ( final int [ ] keys , final byte [ ] states , final int key , final int mask ) { } private static int probe ( final int perturb , final int j ) { } private static int changeIndexSign ( final int index ) { } public int size ( ) { } public T remove ( final int key ) { } private boolean containsKey ( final int key , final int index ) { } private T doRemove ( int index ) { } public T put ( final int key , final T value ) { } private void growTable ( ) { } private boolean shouldGrowTable ( ) { } private static int hashOf ( final int key ) { } public class Iterator { private final int referenceCount ; private int current ; private int next ; private Iterator ( ) { } public boolean hasNext ( ) { } public int key ( ) throws ConcurrentModificationException , NoSuchElementException { } public T value ( ) throws ConcurrentModificationException , NoSuchElementException { } public void advance ( ) throws ConcurrentModificationException , NoSuchElementException { } } private void readObject ( final ObjectInputStream stream ) throws IOException , ClassNotFoundException { } @ SuppressWarnings ( "unchecked" ) private T [ ] buildArray ( final int length ) { } }

Fix:
final int capacity = ( ( int ) ( FastMath . ceil ( ( expectedSize // ( OpenIntToFieldHashMap . LOAD_FACTOR ) ) ) ) ) ;
Buggy code:
public class PlayingState extends BasicGameState { public static int ID = 0 ; private final TerrainFactory terrainFactory ; private final Shroud shroud ; private final Input input ; private final Vector2D screenResolution ; private final int tileWidth ; private final int tileHeight ; private Map map ; private Graphics graphics ; private List < Viewport > viewports = new ArrayList < > ( ) ; public PlayingState ( GameContainer gameContainer , TerrainFactory terrainFactory , Shroud shroud , int tileWidth , int tileHeight ) throws SlickException { } @ Override public int getID ( ) { } @ Override public void init ( GameContainer gameContainer , StateBasedGame game ) throws SlickException { input . addKeyListener ( new com . fundynamic . d2tm . game . event . QuitGameKeyListener ( gameContainer ) ) ; this . map = Map . generateRandom ( terrainFactory , shroud , 64 , 64 , tileWidth , tileHeight ) ; try { float moveSpeed = 16.0F ; Vector2D viewportDrawingPosition = Vector2D . zero ( ) ; <START_BUG> Viewport viewport = new Viewport ( screenResolution , viewportDrawingPosition , Vector2D . zero ( ) , graphics , this . map , moveSpeed , tileWidth , tileHeight ) ; <END_BUG> input . addMouseListener ( new com . fundynamic . d2tm . game . event . ViewportMovementListener ( viewport , screenResolution ) ) ; viewports . add ( viewport ) ; } catch ( SlickException e ) { throw new IllegalStateException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>new<seq2seq4repair_space>viewport!" , e ) ; } } @ Override public void render ( GameContainer container , StateBasedGame game , Graphics g ) throws SlickException { } @ Override public void update ( GameContainer container , StateBasedGame game , int delta ) throws SlickException { } }

Fix:
Viewport viewport = new Viewport ( screenResolution , viewportDrawingPosition , Vector2D . zero ( ) , graphics , this . map , moveSpeed ) ;
Buggy code:
public class UMLIncludeAdditionComboBoxModel extends UMLComboBoxModel2 { public UMLIncludeAdditionComboBoxModel ( ) { } protected void buildModelList ( ) { } protected Object getSelectedModelElement ( ) { } <START_BUG> protected boolean isValidElement ( MBase element ) { <END_BUG> return ( element instanceof MUseCase ) && ( ( ( ( ru . novosoft . uml . behavior . use_cases . MInclude ) ( getTarget ( ) ) ) . getNamespace ( ) ) == ( ( ( MUseCase ) ( element ) ) . getNamespace ( ) ) ) ; } }

Fix:
protected boolean isValidElement ( Object element ) {
Buggy code:
public abstract class Form extends WebMarkupContainer implements IFormSubmitListener { private static Log log = LogFactory . getLog ( Form . class ) ; private final IFeedback feedback ; private static class Count { int count ; } private static final class DefaultFormValidationStrategy implements IFormValidationStrategy { private static final Form . DefaultFormValidationStrategy instance = new Form . DefaultFormValidationStrategy ( ) ; private static final Log log = LogFactory . getLog ( Form . DefaultFormValidationStrategy . class ) ; private static Form . DefaultFormValidationStrategy getInstance ( ) { } public void validate ( final Form form ) { } } public Form ( final String id ) { } public Form ( final String id , final IFeedback feedback ) { } public Form ( final String id , IModel model , final IFeedback feedback ) { } public IFormValidationStrategy getValidationStrategy ( ) { } public final void loadPersistentFormComponentValues ( ) { } public void onFormSubmitted ( ) { } public void removePersistentFormComponentValues ( final boolean disablePersistence ) { } public void setVersioned ( final boolean isVersioned ) { } protected IValuePersister getValuePersister ( ) { } protected void onComponentTag ( final ComponentTag tag ) { } protected void onError ( ) { } protected void internalOnModelChanged ( ) { } protected abstract void onSubmit ( ) { } protected void onValidate ( ) { } protected final void validate ( ) { <START_BUG> getRequestCycle ( ) . setRedirect ( true ) ; <END_BUG> getValidationStrategy ( ) . validate ( this ) ; if ( hasError ( ) ) { invalid ( ) ; onError ( ) ; } else { persistFormComponentData ( ) ; updateFormComponentModels ( ) ; onSubmit ( ) ; } } protected void visitFormComponents ( final FormComponent . IVisitor visitor ) { } private void addFeedback ( ) { } private int countButtons ( ) { } private Button findSubmittingButton ( ) { } private boolean hasError ( ) { } private void invalid ( ) { } private void persistFormComponentData ( ) { } private void updateFormComponentModels ( ) { } }

Fix:
setRedirect ( true ) ;
Buggy code:
public class JdkProxyFactory implements ProxyFactory { public Object createProxy ( final Bundle bundle , final List < Class < ? > > classes , final Callable < Object > dispatcher ) { Iterator < Class < ? > > it = classes . iterator ( ) ; while ( it . hasNext ( ) ) { <START_BUG> if ( it . next ( ) . isInterface ( ) ) <END_BUG> it . remove ( ) ; } return Proxy . newProxyInstance ( new BundleToClassLoaderAdapter ( bundle ) , classes . toArray ( new Class [ classes . size ( ) ] ) , new InvocationHandler ( ) { public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { try { return method . invoke ( dispatcher . call ( ) , args ) ; } catch ( InvocationTargetException ite ) { throw ite . getTargetException ( ) ; } } } ) ; } }

Fix:
if ( ! ( ! ( ! ( it . next ( ) . isInterface ( ) ) ) ) )
Buggy code:
public class PackagedTextTemplate extends TextTemplate { private static final class CachedTextTemplate implements Serializable { private static final long serialVersionUID = 1L ; CachedTextTemplate ( String text ) { } } private static final class CachedTextTemplateKey implements Serializable { private static final long serialVersionUID = 1L ; private final String className ; CachedTextTemplateKey ( Class < ? > clazz , String path ) { } } private static final class TextTemplateCache implements Serializable { private static final long serialVersionUID = 1L ; private final Map < PackagedTextTemplate . CachedTextTemplateKey , PackagedTextTemplate . CachedTextTemplate > cache = new ConcurrentHashMap < PackagedTextTemplate . CachedTextTemplateKey , PackagedTextTemplate . CachedTextTemplate > ( ) ; PackagedTextTemplate . CachedTextTemplate get ( PackagedTextTemplate . CachedTextTemplateKey key ) { } void put ( PackagedTextTemplate . CachedTextTemplateKey key , PackagedTextTemplate . CachedTextTemplate value ) { } } private static final Logger log = LoggerFactory . getLogger ( PackagedTextTemplate . class ) ; private static final long serialVersionUID = 1L ; private static final MetaDataKey < PackagedTextTemplate . TextTemplateCache > TEXT_TEMPLATE_CACHE_KEY = new MetaDataKey < PackagedTextTemplate . TextTemplateCache > ( ) { private static final long serialVersionUID = 1L ; } ; public static final String DEFAULT_CONTENT_TYPE = "text" ; public static final String DEFAULT_ENCODING = null ; private final StringBuilder buffer = new StringBuilder ( ) ; public PackagedTextTemplate ( final Class < ? > clazz , final String fileName ) { } public PackagedTextTemplate ( final Class < ? > clazz , final String fileName , final String contentType ) { } public PackagedTextTemplate ( final Class < ? > clazz , final String fileName , final String contentType , final String encoding ) { } @ Override public String getString ( ) { <START_BUG> IJavaScriptCompressor compressor = Application . get ( ) . getResourceSettings ( ) . getJavascriptCompressor ( ) ; <END_BUG> if ( compressor != null ) { return compressor . compress ( buffer . toString ( ) ) ; } else { return buffer . toString ( ) ; } } @ Override public final TextTemplate interpolate ( Map < String , ? > variables ) { } }

Fix:
IJavaScriptCompressor compressor = Application . get ( ) . getResourceSettings ( ) . getJavaScriptCompressor ( ) ;