nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class AbstractMessageConverterMethodProcessor extends AbstractMessageConverterMethodArgumentResolver implements HandlerMethodReturnValueHandler { private static final MediaType MEDIA_TYPE_APPLICATION = new MediaType ( "application" ) ; private final ContentNegotiationManager contentNegotiationManager ; protected AbstractMessageConverterMethodProcessor ( List < HttpMessageConverter < ? > > messageConverters ) { } protected AbstractMessageConverterMethodProcessor ( List < HttpMessageConverter < ? > > messageConverters , ContentNegotiationManager manager ) { } protected ServletServerHttpResponse createOutputMessage ( NativeWebRequest webRequest ) { } protected < T > void writeWithMessageConverters ( T returnValue , MethodParameter returnType , NativeWebRequest webRequest ) throws IOException , HttpMediaTypeNotAcceptableException { } @ SuppressWarnings ( "unchecked" ) protected < T > void writeWithMessageConverters ( T returnValue , MethodParameter returnType , ServletServerHttpRequest inputMessage , ServletServerHttpResponse outputMessage ) throws IOException , HttpMediaTypeNotAcceptableException { } @ SuppressWarnings ( "unchecked" ) protected List < MediaType > getProducibleMediaTypes ( HttpServletRequest request , Class < ? > returnValueClass ) { } private List < MediaType > getAcceptableMediaTypes ( HttpServletRequest request ) throws HttpMediaTypeNotAcceptableException { } private MediaType getMostSpecificMediaType ( MediaType acceptType , MediaType produceType ) { produceType = produceType . copyQualityValue ( acceptType ) ; <START_BUG> return ( SPECIFICITY_COMPARATOR . compare ( acceptType , produceType ) ) < 0 ? acceptType : produceType ; <END_BUG> } }

Fix:
return ( SPECIFICITY_COMPARATOR . compare ( acceptType , produceType ) ) <= 0 ? acceptType : produceType ;
Buggy code:
public class WildcardFileFilter extends AbstractFileFilter implements Serializable { private final String [ ] wildcards ; private final IOCase caseSensitivity ; public WildcardFileFilter ( String wildcard ) { } public WildcardFileFilter ( String wildcard , IOCase caseSensitivity ) { } public WildcardFileFilter ( String [ ] wildcards ) { } public WildcardFileFilter ( String [ ] wildcards , IOCase caseSensitivity ) { } public WildcardFileFilter ( List < String > wildcards ) { } public WildcardFileFilter ( List < String > wildcards , IOCase caseSensitivity ) { } public boolean accept ( File dir , String name ) { } public boolean accept ( File file ) { } public String toString ( ) { <START_BUG> StringBuffer buffer = new StringBuffer ( ) ; <END_BUG> buffer . append ( super . toString ( ) ) ; buffer . append ( "(" ) ; if ( ( wildcards ) != null ) { for ( int i = 0 ; i < ( wildcards . length ) ; i ++ ) { if ( i > 0 ) { buffer . append ( "," ) ; } buffer . append ( wildcards [ i ] ) ; } } buffer . append ( ")" ) ; return buffer . toString ( ) ; } }

Fix:
StringBuilder buffer = new StringBuilder ( ) ;
Buggy code:
public class EveningCardActivity extends ActionBarActivity { private HomeFragment mHomeFragment ; private String mTrackDate ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void onResume ( ) { super . onResume ( ) ; <START_BUG> SharedPreferences preferences = getSharedPreferences ( TMP_PREF_FILE , MODE_PRIVATE ) ; <END_BUG> SharedPreferences . Editor editor = preferences . edit ( ) ; editor . putString ( "eveningTrackDate" , mTrackDate ) ; editor . commit ( ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
SharedPreferences preferences = getSharedPreferences ( TMP_PREF_FILE , MODE_MULTI_PROCESS ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class EjbLocalRefInjectionTestCase { @ ArquillianResource private ManagementClient managementClient ; @ Deployment public static WebArchive deployment ( ) { } private String performCall ( String urlPattern ) throws Exception { <START_BUG> return HttpRequest . get ( ( ( ( "http:////" + ( managementClient . getMgmtAddress ( ) ) ) + ":8080//war-example//" ) + urlPattern ) , 5 , TimeUnit . SECONDS ) ; <END_BUG> } @ Test public void testLookup ( ) throws Exception { } @ Test public void testEjbLink ( ) throws Exception { } @ Test public void testNoInjectionPoint ( ) throws Exception { } private static StringAsset getWebXml ( ) { } }

Fix:
return HttpRequest . get ( ( ( ( managementClient . getWebUri ( ) ) + "//war-example//" ) + urlPattern ) , 5 , TimeUnit . SECONDS ) ;
Buggy code:
public class WorldTest { @ Before public void setUp ( ) throws Exception { WorldTest . sprites = spriteArrayForSize ( 10 , 10 , ( 10 + ( 2 * 10 ) ) ) ; <START_BUG> mazubPos_225_50 = new Mazub ( 225 , 50 , 1 , 3 , WorldTest . sprites ) ; <END_BUG> testWorld = new World ( 50 , 10 , 5 , 500 , 500 , 8 , 1 ) ; testWorld . getTileAtTilePos ( 0 , 0 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 1 , 0 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 2 , 0 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 3 , 0 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 4 , 0 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 5 , 0 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 6 , 0 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 7 , 0 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 8 , 0 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 9 , 0 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 0 , 1 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 0 , 2 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 9 , 1 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 9 , 2 ) . setGeoFeature ( GROUND ) ; testWorld . getTileAtTilePos ( 1 , 1 ) . setGeoFeature ( MAGMA ) ; } private static Sprite [ ] sprites ; private Mazub mazubPos_225_50 ; private World testWorld ; @ Test public void createWorldCorrect ( ) { } @ Test public void didPlayerWinCorrect ( ) { } @ Test public void isGameOverByWinCorrect ( ) { } @ Test public void isGameOverByDeadCorrect ( ) { } }

Fix:
mazubPos_225_50 = new Mazub ( new Position ( 225 , 50 ) , 1 , 3 , WorldTest . sprites ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { Logger logger = LoggerFactory . getLogger ( Main . class ) ; HashMap < String , String > rdfFileExt = new HashMap < String , String > ( ) ; rdfFileExt . put ( "xml" , "RDF//XML" ) ; rdfFileExt . put ( "rdf" , "RDF//XML" ) ; rdfFileExt . put ( "nt" , "N-TRIPLE" ) ; rdfFileExt . put ( "ttl" , "TURTLE" ) ; rdfFileExt . put ( "n3" , "N3" ) ; String inputPath ; String inputFormat ; String validatorType ; System . out . println ( "===NoSPA<seq2seq4repair_space>RDF<seq2seq4repair_space>Data<seq2seq4repair_space>Cube<seq2seq4repair_space>Validator===" ) ; if ( ( args . length ) != 2 ) { System . out . println ( "Error:<seq2seq4repair_space>Missing<seq2seq4repair_space>arguments" ) ; System . out . println ( "Usage:<seq2seq4repair_space>java<seq2seq4repair_space>-jar<seq2seq4repair_space>jar-name.jar<seq2seq4repair_space><cube-file.(xml|rdf|nt|n3|ttl)><seq2seq4repair_space><(nospa|sparql)>" ) ; return ; } else { inputPath = args [ 0 ] ; inputFormat = rdfFileExt . get ( inputPath . substring ( ( ( inputPath . lastIndexOf ( '.' ) ) + 1 ) ) . toLowerCase ( ) ) ; if ( inputFormat == null ) { System . out . println ( "Error:<seq2seq4repair_space>File<seq2seq4repair_space>path<seq2seq4repair_space>or<seq2seq4repair_space>filename<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ; return ; } validatorType = args [ 1 ] . toUpperCase ( ) ; if ( ! ( ( validatorType . equals ( "NOSPA" ) ) || ( validatorType . equals ( "SPARQL" ) ) ) ) { System . out . println ( "Error:<seq2seq4repair_space>Validator<seq2seq4repair_space>type<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>supported" ) ; return ; } } long start = System . currentTimeMillis ( ) ; Validator validator = ValidatorFactory . createValidator ( validatorType , inputPath , inputFormat ) ; validator . normalize ( ) ; validator . validateAll ( ) ; long end = System . currentTimeMillis ( ) ; <START_BUG> logger . info ( ( ( "The<seq2seq4repair_space>validation<seq2seq4repair_space>task<seq2seq4repair_space>completed<seq2seq4repair_space>in<seq2seq4repair_space>" + ( Long . toString ( ( start - end ) ) ) ) + "ms" ) ) ; <END_BUG> } }

Fix:
logger . info ( ( ( "The<seq2seq4repair_space>validation<seq2seq4repair_space>task<seq2seq4repair_space>completed<seq2seq4repair_space>in<seq2seq4repair_space>" + ( Long . toString ( ( end - start ) ) ) ) + "ms" ) ) ;
Buggy code:
public class HistoryActivity extends Activity { @ Override public void onCreate ( Bundle savedInstanceState ) { } private void setupViewMoreButtonListener ( final TrackerService service ) { <START_BUG> final Button history = ( ( Button ) ( findViewById ( historyButton ) ) ) ; <END_BUG> history . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { String textToDisplay = "" ; for ( TrackerEntry entry : service . load ( 30 , true ) ) { textToDisplay += ( ( ( ( ( entry . getDisplayTime ( ) ) + ":<seq2seq4repair_space>" ) + ( entry . latitude ) ) + "<seq2seq4repair_space>//<seq2seq4repair_space>" ) + ( entry . longitude ) ) + ( System . getProperty ( "line.separator" ) ) ; } ( ( android . widget . TextView ) ( findViewById ( R . id . historicEntries ) ) ) . setText ( textToDisplay ) ; } } ) ; } }

Fix:
final Button history = ( ( Button ) ( findViewById ( viewMore ) ) ) ;
Buggy code:
public class HunspellStemFilterTest extends BaseTokenStreamTestCase { private static HunspellDictionary DICTIONARY ; @ BeforeClass public static void beforeClass ( ) throws IOException , ParseException { } public static HunspellDictionary createDict ( boolean ignoreCase ) throws IOException , ParseException { } public void testKeywordAttribute ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { Analyzer analyzer = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { Tokenizer tokenizer = new MockTokenizer ( reader , MockTokenizer . WHITESPACE , false ) ; return new TokenStreamComponents ( tokenizer , new HunspellStemFilter ( tokenizer , HunspellStemFilterTest . DICTIONARY ) ) ; } } ; <START_BUG> checkRandomData ( random ( ) , analyzer , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } public void testEmptyTerm ( ) throws IOException { } }

Fix:
checkRandomData ( random ( ) , analyzer , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class ElementManualCraftingGrid extends BaseElement { int offset = 7 ; ItemStack [ ] items ; public ElementManualCraftingGrid ( GuiManual gui , int x , int y , ItemStack [ ] i ) { } @ Override public boolean handleMouseClicked ( int x , int y , int mouseButton ) { } @ Override public void addTooltip ( List < String > list ) { } @ Override protected void drawBackground ( ) { GL11 . glColor4f ( 1.0F , 1.0F , 1.0F , 1.0F ) ; parent . getMinecraft ( ) . renderEngine . bindTexture ( texture ) ; parent . drawTexturedModalRect ( posX , posY , 0 , 0 , 66 , 66 ) ; <START_BUG> if ( ( items . length ) == 10 ) <END_BUG> parent . drawTexturedModalRect ( ( ( posX ) + 18 ) , ( ( posY ) + 69 ) , 66 , 0 , 30 , 30 ) ; } @ Override protected void drawContent ( ) { } @ Override public void update ( ) { } public void setItems ( ItemStack [ ] s ) { } }

Fix:
if ( ( ( items ) != null ) && ( ( items . length ) == 10 ) )
Buggy code:
public class Main extends Application { @ Override public void start ( Stage primaryStage ) throws Exception { SplitPane mainSplitPane = Globals . mainSplitPane ; SplitPane topPane = Globals . topSplitPane ; SplitPane bottomPane = Globals . bottomSplitPane ; topPane . getItems ( ) . addAll ( projectsPane , editorPane ) ; topPane . setDividerPositions ( 0.4F ) ; bottomPane . getItems ( ) . addAll ( consolePane , replPane ) ; bottomPane . setDividerPositions ( 0.5F ) ; mainSplitPane . getItems ( ) . addAll ( topPane , bottomPane ) ; mainSplitPane . setOrientation ( Orientation . VERTICAL ) ; mainSplitPane . setDividerPositions ( 0.8F ) ; SplitPane . setResizableWithParent ( projectsPane , false ) ; MenuBar menuBar = new MenuBar ( ) ; <START_BUG> menuBar . getMenus ( ) . addAll ( new FileMenu ( ) , new EditMenu ( ) , new PreferencesMenu ( ) , new HelpMenu ( ) ) ; <END_BUG> BorderPane root = new BorderPane ( ) ; root . setTop ( menuBar ) ; root . setCenter ( mainSplitPane ) ; Scene scene = new Scene ( root , 900 , 600 ) ; scene . getStylesheets ( ) . add ( Main . class . getResource ( "//syntax//meruem.css" ) . toExternalForm ( ) ) ; Globals . setMainStage ( primaryStage ) ; primaryStage . setTitle ( "Winter" ) ; primaryStage . setScene ( scene ) ; primaryStage . setMaximized ( true ) ; primaryStage . show ( ) ; } public static void main ( String [ ] args ) { } }

Fix:
menuBar . getMenus ( ) . addAll ( fileMenu , new EditMenu ( ) , new PreferencesMenu ( ) , new HelpMenu ( ) ) ;
Buggy code:
public class PosPanel implements FormPanel { private PosBasePanel panel ; public void dispose ( ) { } public void init ( int WindowNo , FormFrame frame ) { panel = new PosBasePanel ( ) ; <START_BUG> panel . init ( 0 , frame ) ; <END_BUG> } }

Fix:
panel . init ( WindowNo , frame ) ;
Buggy code:
class AbstractRadio < T > extends WebMarkupContainer < T > { private static final long serialVersionUID = 1L ; private RadioGroup group ; private int value ; public AbstractRadio ( MarkupContainer parent , String id ) { } public AbstractRadio ( MarkupContainer parent , String id , IModel < T > model ) { } public AbstractRadio ( MarkupContainer parent , String id , RadioGroup group ) { } public AbstractRadio ( MarkupContainer parent , String id , IModel < T > model , RadioGroup group ) { } public final String getValue ( ) { if ( ( value ) < 0 ) { value = AbstractRadio . getPage ( ) . getAutoIndex ( ) ; } <START_BUG> return "check" + ( value ) ; <END_BUG> } protected final RadioGroup getGroup ( ) { } }

Fix:
return "radio" + ( value ) ;
Buggy code:
public class XWalkViewWithOnHideOnShow extends XWalkActivity { private XWalkView mXWalkView ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onXWalkReady ( ) { StringBuffer mess = new StringBuffer ( ) ; mess . append ( "Test<seq2seq4repair_space>Purpose:<seq2seq4repair_space>\n\n" ) . append ( "Verifies<seq2seq4repair_space>XWalkView<seq2seq4repair_space>can<seq2seq4repair_space>hide<seq2seq4repair_space>and<seq2seq4repair_space>show.\n\n" ) . append ( "Test<seq2seq4repair_space>Step:\n\n" ) . append ( "1.<seq2seq4repair_space>Play<seq2seq4repair_space>the<seq2seq4repair_space>video<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>page,<seq2seq4repair_space>then<seq2seq4repair_space>click<seq2seq4repair_space>home<seq2seq4repair_space>key.\n" ) . append ( "2.<seq2seq4repair_space>Click<seq2seq4repair_space>the<seq2seq4repair_space>\'EmbeddedAPISamples\'<seq2seq4repair_space>app<seq2seq4repair_space>again.\n\n" ) . append ( "Expected<seq2seq4repair_space>Result:\n\n" ) . append ( "1.Test<seq2seq4repair_space>passes<seq2seq4repair_space>if<seq2seq4repair_space>app<seq2seq4repair_space>video<seq2seq4repair_space>can<seq2seq4repair_space>be<seq2seq4repair_space>paused<seq2seq4repair_space>when<seq2seq4repair_space>clicking<seq2seq4repair_space>home<seq2seq4repair_space>key." ) . append ( "2.Test<seq2seq4repair_space>passes<seq2seq4repair_space>if<seq2seq4repair_space>there<seq2seq4repair_space>is<seq2seq4repair_space>no<seq2seq4repair_space>short<seq2seq4repair_space>white<seq2seq4repair_space>screen<seq2seq4repair_space>displayed<seq2seq4repair_space>when<seq2seq4repair_space>clicking<seq2seq4repair_space>home<seq2seq4repair_space>key." ) ; new AlertDialog . Builder ( this ) . setTitle ( "Info" ) . setMessage ( mess . toString ( ) ) . setPositiveButton ( "confirm" , null ) . show ( ) ; <START_BUG> mXWalkView . load ( "http:////www.iandevlin.com//html5//webvtt-example.html" , null ) ; <END_BUG> } }

Fix:
mXWalkView . load ( "https:////www.w3.org//2010//05//video//mediaevents.html" , null ) ;
Buggy code:
public abstract class GroupingTestCase extends SingleEMTestCase { protected abstract void prepareQuery ( Query q ) { } public void setUp ( ) { <START_BUG> super . setUp ( AllFieldTypes . class , CLEAR_TABLES , "openjpa.Log" , "SQL=TRACE" ) ; <END_BUG> AllFieldTypes pc1 = new AllFieldTypes ( ) ; AllFieldTypes pc2 = new AllFieldTypes ( ) ; AllFieldTypes pc3 = new AllFieldTypes ( ) ; AllFieldTypes pc4 = new AllFieldTypes ( ) ; pc1 . setIntField ( 1 ) ; pc1 . setShortField ( ( ( short ) ( - 1 ) ) ) ; pc2 . setIntField ( 1 ) ; pc2 . setShortField ( ( ( short ) ( - 1 ) ) ) ; pc3 . setIntField ( 2 ) ; pc3 . setShortField ( ( ( short ) ( - 2 ) ) ) ; pc4 . setIntField ( 2 ) ; pc4 . setShortField ( ( ( short ) ( - 2 ) ) ) ; pc1 . setStringField ( "abc" ) ; pc2 . setStringField ( "acd" ) ; pc3 . setStringField ( "def" ) ; pc4 . setStringField ( "efg" ) ; pc2 . setByteField ( ( ( byte ) ( 1 ) ) ) ; pc3 . setByteField ( ( ( byte ) ( 1 ) ) ) ; pc1 . setByteField ( ( ( byte ) ( 0 ) ) ) ; pc4 . setByteField ( ( ( byte ) ( 2 ) ) ) ; pc1 . setLongField ( 1L ) ; pc2 . setLongField ( 2L ) ; pc3 . setLongField ( 3L ) ; pc4 . setLongField ( 4L ) ; pc1 . setSelfOneOne ( pc4 ) ; pc2 . setSelfOneOne ( pc3 ) ; pc3 . setSelfOneOne ( pc2 ) ; pc4 . setSelfOneOne ( pc1 ) ; if ( getName ( ) . startsWith ( "testVariable" ) ) { pc1 . setSelfOneOne ( pc1 ) ; pc2 . setSelfOneOne ( pc1 ) ; pc1 . getSelfOneMany ( ) . add ( pc1 ) ; pc1 . getSelfOneMany ( ) . add ( pc2 ) ; pc3 . setSelfOneOne ( pc3 ) ; pc4 . setSelfOneOne ( pc3 ) ; pc3 . getSelfOneMany ( ) . add ( pc3 ) ; pc3 . getSelfOneMany ( ) . add ( pc4 ) ; } EntityManager em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; em . persist ( pc1 ) ; em . persist ( pc2 ) ; em . persist ( pc3 ) ; em . persist ( pc4 ) ; em . getTransaction ( ) . commit ( ) ; em . close ( ) ; } public void testSimpleGroup ( ) { } public void testOrderByAggregate ( ) { } public void testCompoundGroupSame ( ) { } public void testCompoundGroupDifferent ( ) { } public void testDifferentGroupLengths ( ) { } public void testGroupRelationField ( ) { } public void testSubstringInGroupBy ( ) { } public void testGroupedAggregate ( ) { } public void testGroupedRelationAggregate ( ) { } public void testGroupedMixedProjection ( ) { } public void testSimpleHaving ( ) { } public void testAggregateHaving ( ) { } public void testMixedHaving ( ) { } public void testVariableGroup ( ) { } public void testVariableHaving ( ) { } }

Fix:
super . setUp ( AllFieldTypes . class , CLEAR_TABLES ) ;
Buggy code:
public class MainActivity extends DLBasePluginActivity { private static final String TAG = "Client-MainActivity" ; @ Override public void onCreate ( Bundle savedInstanceState ) { } private void initView ( Bundle savedInstanceState ) { } private View generateContentView ( final Context context ) { LinearLayout layout = new LinearLayout ( context ) ; layout . setLayoutParams ( new LayoutParams ( LayoutParams . MATCH_PARENT , LayoutParams . MATCH_PARENT ) ) ; layout . setBackgroundColor ( Color . parseColor ( "#F79AB5" ) ) ; Button button = new Button ( context ) ; button . setText ( "Start<seq2seq4repair_space>TestActivity" ) ; layout . addView ( button , MATCH_PARENT , WRAP_CONTENT ) ; button . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { Toast . makeText ( context , "you<seq2seq4repair_space>clicked<seq2seq4repair_space>button" , LENGTH_SHORT ) . show ( ) ; <START_BUG> DLIntent intent = new DLIntent ( TestFragmentActivity . class ) ; <END_BUG> intent . putExtra ( "dl_extra" , "from<seq2seq4repair_space>DL<seq2seq4repair_space>framework" ) ; startPluginActivityForResult ( intent , 0 ) ; } } ) ; return layout ; } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } }

Fix:
DLIntent intent = new DLIntent ( getPackageName ( ) , TestFragmentActivity . class ) ;
Buggy code:
public class JavaSearchPattern extends SearchPattern implements IIndexConstants { boolean isCaseSensitive ; boolean isCamelCase ; int matchMode ; int matchCompatibility ; public int fineGrain = 0 ; public static final int MATCH_MODE_MASK = ( ( ( ( ( SearchPattern . R_EXACT_MATCH ) | ( SearchPattern . R_PREFIX_MATCH ) ) | ( SearchPattern . R_PATTERN_MATCH ) ) | ( SearchPattern . R_REGEXP_MATCH ) ) | ( SearchPattern . R_CAMELCASE_MATCH ) ) | ( SearchPattern . R_CAMELCASE_SAME_PART_COUNT_MATCH ) ; public static final int MATCH_COMPATIBILITY_MASK = ( ( SearchPattern . R_ERASURE_MATCH ) | ( SearchPattern . R_EQUIVALENT_MATCH ) ) | ( SearchPattern . R_FULL_MATCH ) ; char [ ] [ ] typeSignatures ; private char [ ] [ ] [ ] typeArguments ; private int flags = 0 ; static final int HAS_TYPE_ARGUMENTS = 1 ; protected JavaSearchPattern ( int patternKind , int matchRule ) { } public static String getFineGrainFlagString ( final int fineGrain ) { } public SearchPattern getBlankPattern ( ) { } final int getMatchMode ( ) { } final boolean isCamelCase ( ) { } final boolean isCaseSensitive ( ) { } final boolean isErasureMatch ( ) { } final boolean isEquivalentMatch ( ) { } char [ ] [ ] extractMethodArguments ( IMethod method ) { } final char [ ] [ ] [ ] getTypeArguments ( ) { <START_BUG> return typeArguments ; <END_BUG> } public final boolean hasSignatures ( ) { } public final boolean hasTypeArguments ( ) { } public final boolean hasTypeParameters ( ) { } boolean matchDifferentTypeSuffixes ( int typeSuffix , int patternSuffix ) { } protected StringBuffer print ( StringBuffer output ) { } final void setTypeArguments ( char [ ] [ ] [ ] typeArguments ) { } void storeTypeSignaturesAndArguments ( IType type ) { } public final String toString ( ) { } }

Fix:
return this . typeArguments ;
Buggy code:
public class TestRegexExtractor extends TestCase { private RegexExtractor extractor ; private SampleResult result ; private JMeterVariables vars ; public TestRegexExtractor ( String name ) { } private JMeterContext jmctx ; @ Override public void setUp ( ) { jmctx = JMeterContextService . getContext ( ) ; extractor = new RegexExtractor ( ) ; extractor . setThreadContext ( jmctx ) ; extractor . setRefName ( "regVal" ) ; result = new SampleResult ( ) ; String data = "<company-xmlext-query-ret>" + ( ( ( ( ( ( ( ( ( ( ( ( ( "<row>" + "<value<seq2seq4repair_space>field=\"RetCode\">LIS_OK<//value>" ) + "<value<seq2seq4repair_space>field=\"RetCodeExtension\"><//value>" ) + "<value<seq2seq4repair_space>field=\"alias\"><//value>" ) + "<value<seq2seq4repair_space>field=\"positioncount\"><//value>" ) + "<value<seq2seq4repair_space>field=\"invalidpincount\">0<//value>" ) + "<value<seq2seq4repair_space>field=\"pinposition1\">1<//value>" ) + "<value<seq2seq4repair_space>field=\"pinpositionvalue1\"><//value>" ) + "<value<seq2seq4repair_space>field=\"pinposition2\">5<//value>" ) + "<value<seq2seq4repair_space>field=\"pinpositionvalue2\"><//value>" ) + "<value<seq2seq4repair_space>field=\"pinposition3\">6<//value>" ) + "<value<seq2seq4repair_space>field=\"pinpositionvalue3\"><//value>" ) + "<//row>" ) + "<//company-xmlext-query-ret>" ) ; <START_BUG> result . setResponseData ( data . getBytes ( ) ) ; <END_BUG> result . setResponseHeaders ( "Header1:<seq2seq4repair_space>Value1\nHeader2:<seq2seq4repair_space>Value2" ) ; result . setResponseCode ( "abcd" ) ; result . setResponseMessage ( "The<seq2seq4repair_space>quick<seq2seq4repair_space>brown<seq2seq4repair_space>fox" ) ; vars = new JMeterVariables ( ) ; jmctx . setVariables ( vars ) ; jmctx . setPreviousResult ( result ) ; } public void testVariableExtraction0 ( ) throws Exception { } public void testVariableExtraction ( ) throws Exception { } private static void templateSetup ( RegexExtractor rex , String tmp ) { } public void testTemplate1 ( ) throws Exception { } public void testTemplate2 ( ) throws Exception { } public void testTemplate3 ( ) throws Exception { } public void testTemplate4 ( ) throws Exception { } public void testTemplate5 ( ) throws Exception { } public void testTemplate6 ( ) throws Exception { } public void testTemplate7 ( ) throws Exception { } public void testVariableExtraction2 ( ) throws Exception { } public void testVariableExtraction6 ( ) throws Exception { } public void testVariableExtraction3 ( ) throws Exception { } public void testVariableExtraction5 ( ) throws Exception { } public void testVariableExtraction7 ( ) throws Exception { } public void testVariableExtraction8 ( ) throws Exception { } public void testVariableExtraction9 ( ) throws Exception { } public void testNoDefault ( ) throws Exception { } public void testDefault ( ) throws Exception { } public void testStaleVariables ( ) throws Exception { } public void testScope1 ( ) throws Exception { } public void testScope2 ( ) throws Exception { } }

Fix:
result . setResponseData ( data , null ) ;
Buggy code:
public abstract class AbstractMetadataFactoryTest extends ECFAbstractTestCase { protected static final String DEFAULT_SERVICE_INTF_PACKAGE = "com.foo" ; protected static final String DEFAULT_SERVICE_INTF_VERSION = "3.0.0" ; protected static final String DEFAULT_SERVICE_INTF = ( ( AbstractMetadataFactoryTest . DEFAULT_SERVICE_INTF_PACKAGE ) + "." ) + "Foo" ; protected static final String DEFAULT_ENDPOINT_ID = "ecftcp:////localhost:3282//server" ; protected static final String DEFAULT_SERVICE_IMPORTED_CONFIG = "ecf.generic.server" ; protected static final String DEFAULT_SERVICE_INTENT1 = "test.intent.1" ; protected static final String DEFAULT_SERVICE_INTENT2 = "test.intent.2" ; protected static final String DEFAULT_ECF_TARGET_ID = "ecftcp:////localhost:3333//server" ; protected static final String DEFAULT_RSFILTER = "(&(key1=foo)(key2=foo2))" ; protected static final String EXTRA_PROPERTY1 = "test.extra.prop.value.1" ; protected static final String EXTRA_PROPERTY2 = "test.extra.prop.value.2" ; protected IServiceInfoFactory serviceInfoFactory ; protected IDiscoveredEndpointDescriptionFactory endpointDescriptionFactory ; protected IDiscoveryAdvertiser discoveryAdvertiser ; protected IDiscoveryLocator discoveryLocator ; protected IDiscoveryLocator getDiscoveryLocator ( ) { } protected IDiscoveryAdvertiser getDiscoveryAdvertiser ( ) { } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } protected Object createOSGiObjectClass ( ) { } protected String createOSGiEndpointFrameworkUUID ( ) { } protected String createOSGiEndpointId ( ) { } protected Long createOSGiEndpointServiceId ( ) { } protected EndpointDescription createRequiredEndpointDescription ( ) { } protected EndpointDescription createFullEndpointDescription ( ) { } protected void addExtraProperties ( Map < String , Object > props ) { } protected EndpointDescription createBadOSGiEndpointDescrption ( ) throws Exception { } protected EndpointDescription createBadECFEndpointDescrption ( ) throws Exception { } protected String createOSGiServiceImportedConfig ( ) { } protected ID createECFContainerID ( Map < String , Object > props ) { } protected ID createECFTargetID ( Map < String , Object > props ) { } protected void createECFRemoteServiceId ( Map < String , Object > props ) { } protected void addRequiredOSGiProperties ( Map < String , Object > props ) { } protected void addOptionalOSGiProperties ( Map < String , Object > props ) { } protected Object createOSGiServiceIntents ( ) { } protected String createECFRSFilter ( Map < String , Object > props ) { } protected ID [ ] createECFIDFilterIDs ( Map < String , Object > props ) { } protected IServiceInfo createServiceInfoForDiscovery ( EndpointDescription endpointDescription ) { <START_BUG> return serviceInfoFactory . createServiceInfoForDiscovery ( discoveryAdvertiser , endpointDescription ) ; <END_BUG> } protected EndpointDescription createEndpointDescriptionFromDiscovery ( IServiceInfo discoveredServiceInfo ) { } }

Fix:
return serviceInfoFactory . createServiceInfo ( discoveryAdvertiser , endpointDescription ) ;
Buggy code:
@ Entity @ Table ( name = "CooinServer" ) @ DiscriminatorValue ( "CooinServer" ) public class CooinServer extends ActorVS implements Serializable { public static final long serialVersionUID = 1L ; public CooinServer ( ) { } public CooinServer ( ActorVS actorVS ) { } @ Override public Type getType ( ) { } public String getTransactionVSServiceURL ( ) { } public String getCooinRequestServiceURL ( ) { } public String getCooinStatusServiceURL ( String hashCertVS ) { <START_BUG> return ( ( getServerURL ( ) ) + "//cooin//status//" ) + ( DatatypeConverter . printHexBinary ( hashCertVS . getBytes ( ) ) ) ; <END_BUG> } public String getCooinTransactionServiceURL ( ) { } public String getUserDashBoardURL ( ) { } public String getAdminDashBoardURL ( ) { } public String getSaveBankServiceURL ( ) { } public String getSaveGroupVSServiceURL ( ) { } public String getGroupVSSubscriptionServiceURL ( Long groupId ) { } public String getWalletURL ( ) { } public String getGroupVSUsersServiceURL ( Long groupId , Integer max , Integer offset , SubscriptionVS . State subscriptionState , UserVS . State userVSState ) { } public String getGroupVSUsersActivationServiceURL ( ) { } public String getDeviceVSConnectedServiceURL ( String nif ) { } }

Fix:
return ( ( getServerURL ( ) ) + "//cooin//state//" ) + ( DatatypeConverter . printHexBinary ( hashCertVS . getBytes ( ) ) ) ;
Buggy code:
public class BlockingPromise < T > extends BasePromise < T > { private final CountDownLatch countDownLatch = new CountDownLatch ( 1 ) ; private final Expected < Duration > duration ; public BlockingPromise ( ) { } public BlockingPromise ( final Duration duration ) { } @ Override public void onResult ( Result < T > result ) { } @ Override public Expected < T > expect ( ) { } @ Override public T get ( ) { } @ Override public Throwable cause ( ) { } @ Override public boolean failure ( ) { } @ Override public boolean success ( ) { } private void doAwait ( final Callable < Void > runnable ) { } protected boolean _success ( ) { } private void await ( ) { } @ Override public < U > Promise < U > thenMap ( Function < ? super T , ? extends U > mapper ) { <START_BUG> final Promise < U > mappedPromise = Promises . promise ( ) ; <END_BUG> this . whenComplete ( ( p ) -> { final BlockingPromise < T > promise = ( ( BlockingPromise ) ( p ) ) ; if ( promise . _success ( ) ) { final T t = promise . result . get ( ) . get ( ) ; final U mapped = mapper . apply ( t ) ; mappedPromise . reply ( mapped ) ; } else { mappedPromise . reject ( promise . cause ( ) ) ; } } ) ; return mappedPromise ; } }

Fix:
final Promise < U > mappedPromise = Promises . blockingPromise ( ) ;
Buggy code:
public class TableItem extends Item { Table parent ; String [ ] strings ; Image [ ] images ; boolean checked ; boolean grayed ; boolean cached ; Color foreground ; Color background ; Color [ ] cellForeground ; Color [ ] cellBackground ; Font font ; Font [ ] cellFont ; int width = - 1 ; public TableItem ( Table parent , int style ) { } public TableItem ( Table parent , int style , int index ) { } TableItem ( Table parent , int style , int index , boolean create ) { } static Table checkNull ( Table control ) { } int calculateWidth ( int index , GC gc ) { } protected void checkSubclass ( ) { } void clear ( ) { } public Color getBackground ( ) { } public Color getBackground ( int index ) { } public Rectangle getBounds ( int index ) { } public boolean getChecked ( ) { } public Font getFont ( ) { } public Font getFont ( int index ) { } public Color getForeground ( ) { } public Color getForeground ( int index ) { } public boolean getGrayed ( ) { } public Image getImage ( ) { } public Image getImage ( int index ) { } public Rectangle getImageBounds ( int index ) { } public int getImageIndent ( ) { } String getNameText ( ) { if ( ( ( parent . style ) & ( SWT . VIRTUAL ) ) != 0 ) { if ( ! ( cached ) ) return "*virtual*" ; } <START_BUG> return getText ( ) ; <END_BUG> } public Table getParent ( ) { } public String getText ( ) { } public String getText ( int index ) { } void redraw ( int propertyID ) { } void releaseChild ( ) { } void releaseWidget ( ) { } public void setBackground ( Color color ) { } public void setBackground ( int index , Color color ) { } public void setChecked ( boolean checked ) { } public void setFont ( Font font ) { } public void setFont ( int index , Font font ) { } public void setForeground ( Color color ) { } public void setForeground ( int index , Color color ) { } public void setGrayed ( boolean grayed ) { } public void setImage ( Image [ ] images ) { } public void setImage ( int index , Image image ) { } public void setImage ( Image image ) { } public void setImageIndent ( int indent ) { } public void setText ( String [ ] strings ) { } public void setText ( int index , String string ) { } public void setText ( String string ) { } }

Fix:
return super . getNameText ( ) ;
Buggy code:
public class NiceUrlApplication extends WicketExampleApplication { public NiceUrlApplication ( ) { } @ Override public Class < ? extends Page < ? > > getHomePage ( ) { } private void mountBookmarkablePageWithUrlCoding ( String path , Class pageClass ) { } @ Override protected void init ( ) { getPageSettings ( ) . setAutomaticMultiWindowSupport ( false ) ; mountBookmarkablePage ( "//the//homepage//path" , Home . class ) ; mountBookmarkablePage ( "//a//nice//path//to//the//first//page" , Page1 . class ) ; mountBookmarkablePage ( "//path//to//page2" , Page2 . class ) ; <START_BUG> mountBookmarkablePageWithUrlCoding ( "//path//to//page2qpencoded//" , Page2QP . class ) ; <END_BUG> mount ( "//my//mounted//package" , PackageName . forClass ( Page3 . class ) ) ; } @ Override protected IRequestCycleProcessor newRequestCycleProcessor ( ) { } }

Fix:
mountBookmarkablePageWithUrlCoding ( "//path//to//page2qpencoded" , Page2QP . class ) ;
Buggy code:
public abstract class AbstractDataSourceAdd extends AbstractAddStepHandler { @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final Resource resource = createResource ( context ) ; populateModel ( context , operation , resource ) ; final ModelNode model = resource . getModel ( ) ; <START_BUG> boolean enabled = ( ! ( operation . hasDefined ( Constants . ENABLED . getName ( ) ) ) ) || ( operation . get ( Constants . ENABLED . getName ( ) ) . asBoolean ( ) ) ; <END_BUG> if ( requiresRuntime ( context ) ) { context . addStep ( new OperationStepHandler ( ) { public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final List < ServiceController < ? > > controllers = new ArrayList < ServiceController < ? > > ( ) ; final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler ( ) ; performRuntime ( context , operation , resource , model , verificationHandler , controllers ) ; if ( requiresRuntimeVerification ( ) ) { context . addStep ( verificationHandler , VERIFY ) ; } context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { rollbackRuntime ( context , operation , model , controllers ) ; } } ) ; } } , RUNTIME ) ; } if ( enabled ) { context . addStep ( new DataSourceEnable ( ( ( this ) instanceof XaDataSourceAdd ) ) , MODEL ) ; } context . stepCompleted ( ) ; } @ Override protected final void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } private void performRuntime ( final OperationContext context , final ModelNode operation , final Resource resource , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > controllers ) throws OperationFailedException { } protected abstract void startConfigAndAddDependency ( ServiceBuilder < ? > dataSourceServiceBuilder , AbstractDataSourceService dataSourceService , String jndiName , ServiceTarget serviceTarget , final ModelNode operation , final ServiceVerificationHandler serviceVerificationHandler ) throws OperationFailedException { } protected abstract void populateModel ( final ModelNode operation , final ModelNode model ) throws OperationFailedException { } protected abstract AbstractDataSourceService createDataSourceService ( final String dsName , final String jndiName ) throws OperationFailedException { } static void populateAddModel ( final ModelNode operation , final ModelNode modelNode , final String connectionPropertiesProp , final SimpleAttributeDefinition [ ] attributes , PropertiesAttributeDefinition [ ] properties ) throws OperationFailedException { } }

Fix:
boolean enabled = ( ! ( operation . hasDefined ( Constants . ENABLED . getName ( ) ) ) ) || ( Constants . ENABLED . resolveModelAttribute ( context , model ) . asBoolean ( ) ) ;
Buggy code:
class IssueWrapper { private static final Log LOG = LogFactory . getLog ( JiraIssueTracker . class ) ; Issue jiraSearchIssueToIssue ( URL baseURL , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue ) { } private void setCreationTime ( Issue issue , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue ) { } private void setLastUpdated ( Issue issue , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue ) { } Issue jiraIssueToIssue ( URL url , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue ) { } IssueInput issueToFluentUpdate ( Issue issue , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue , Project project ) throws NotFoundException { } private void updateStreamStatus ( Issue issue , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue , Map < String , Version > versionsMap , IssueInputBuilder inputBuilder ) throws NotFoundException { } private void updateFixVersions ( Issue issue , Map < String , Version > versionsMap , IssueInputBuilder inputBuilder ) throws NotFoundException { } private void checkUnsupportedUpdateFields ( Issue issue ) { } private void setIssueProject ( Issue issue , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue ) { } private void setIssueComponent ( Issue issue , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue ) { } private IllegalArgumentException nullUsername ( ) { } private void setIssueUser ( BiConsumer < Issue , User > function , Issue issue , User user ) { } private void setIssueStage ( Issue issue , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue ) { } private void setIssueType ( Issue issue , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue ) { } private void setIssueStream ( Issue issue , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue ) { } private void setIssueReleases ( Issue issue , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue ) { } private void setIssueDependencies ( URL originalUrl , Issue issue , Iterable < IssueLink > links ) { } private void setIssueComments ( Issue issue , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue ) { } private void setPullRequests ( JiraIssue issue , com . atlassian . jira . rest . client . api . domain . Issue jiraIssue ) { } private static void extractPullRequests ( JiraIssue issue , JSONArray urls ) { <START_BUG> if ( ( urls . length ( ) ) > 0 ) { <END_BUG> List < URL > prUrls = new ArrayList < URL > ( urls . length ( ) ) ; for ( int index = 0 ; index < ( urls . length ( ) ) ; index ++ ) prUrls . add ( Utils . createURL ( IssueWrapper . getFromJSONArray ( index , urls ) . toString ( ) ) ) ; issue . setPullRequests ( prUrls ) ; } } private static Object getFromJSONArray ( int i , JSONArray urls ) { } private URL trackerIdToBrowsableUrl ( URL url , String trackerId ) { } }

Fix:
if ( ( urls != null ) && ( ( urls . length ( ) ) > 0 ) ) {
Buggy code:
@ WebServlet ( "//DashBoard" ) public class DashBoard extends HttpServlet { private static final long serialVersionUID = 1L ; private ComputerService computerService ; private Page page ; public DashBoard ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { int offset = 10 ; <START_BUG> int index = 1 ; <END_BUG> String strIndex = request . getParameter ( "index" ) ; String strOffset = request . getParameter ( "offset" ) ; if ( Util . checkInt ( strIndex ) ) { index = Integer . parseInt ( strIndex ) ; } if ( Util . checkInt ( strOffset ) ) { offset = Integer . parseInt ( strOffset ) ; } String word = request . getParameter ( "search" ) ; if ( word == null ) { word = "" ; } page . setPage ( index , offset , word ) ; page . setComputersDTO ( MapperDTO . computersToDTO ( computerService . search ( word , ( index * offset ) , offset ) ) ) ; request . setAttribute ( "page" , page ) ; request . setAttribute ( "computersFound" , computerService . count ( word ) ) ; getServletContext ( ) . getRequestDispatcher ( "//views//dashboard.jsp" ) . forward ( request , response ) ; } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } }

Fix:
int index = 0 ;
Buggy code:
public class TextureLoader { private static HashMap < String , Texture2D > textureMap = new HashMap < String , Texture2D > ( ) ; public static Texture2D loadTexture ( String filename ) { } public static Texture2D loadTexture ( String filename , String textureName ) { } public static Texture2D loadTexture ( String filename , InterpolationType interpolationType ) { } public static Texture2D loadTexture ( String filename , String textureName , InterpolationType interpolationType ) { Texture2D retTexture = TextureLoader . textureMap . get ( filename ) ; if ( retTexture != null ) return retTexture ; try { BufferedImage image = ImageIO . read ( new File ( filename ) ) ; <START_BUG> return TextureLoader . loadTexture ( image , textureName , interpolationType ) ; <END_BUG> } catch ( IOException e ) { e . printStackTrace ( ) ; System . err . println ( ( "Missing<seq2seq4repair_space>Texture:<seq2seq4repair_space>" + filename ) ) ; } TextureLoader . textureMap . put ( filename , retTexture ) ; return retTexture ; } public static Texture2D loadTexture ( BufferedImage image , String textureName , InterpolationType interpolationType ) { } protected static void unloadTexture ( String filename ) { } }

Fix:
retTexture = TextureLoader . loadTexture ( image , textureName , interpolationType ) ;
Buggy code:
public class ServerManager { private List < String > hosts = new ArrayList < String > ( ) ; private int activeHostIndex = 0 ; private String configFilename ; private static final Logger logger = LoggerFactory . getLogger ( ServerManager . class ) ; public ServerManager ( final String configFilename ) { } public String getActiveHost ( ) { } public void addHost ( final String host ) { } public int getNrOfHosts ( ) { } public List < String > getAll ( ) { } public String changeActiveHost ( ) { } public void writeHostListToDisk ( ) { final File file = new File ( this . configFilename ) ; if ( file . exists ( ) ) { file . delete ( ) ; } BufferedWriter writer = null ; try { writer = new BufferedWriter ( new FileWriter ( file ) ) ; int loopCounter = 0 ; int serverIndexCounter = this . activeHostIndex ; while ( loopCounter < ( this . getNrOfHosts ( ) ) ) { <START_BUG> writer . append ( this . hosts . get ( serverIndexCounter ) ) ; <END_BUG> if ( serverIndexCounter < ( ( this . getNrOfHosts ( ) ) - 1 ) ) { serverIndexCounter ++ ; } else { serverIndexCounter = 0 ; } loopCounter ++ ; } ServerManager . logger . info ( "Successfully<seq2seq4repair_space>write<seq2seq4repair_space>{}<seq2seq4repair_space>server<seq2seq4repair_space>hosts<seq2seq4repair_space>to<seq2seq4repair_space>{}." , this . getNrOfHosts ( ) , this . configFilename ) ; } catch ( IOException e ) { ServerManager . logger . warn ( "Writing<seq2seq4repair_space>to<seq2seq4repair_space>{}<seq2seq4repair_space>failed." , file . getName ( ) ) ; } finally { ServerManager . closeWriterQuietly ( writer ) ; } } @ Override public String toString ( ) { } private static void closeWriterQuietly ( final Writer writer ) { } }

Fix:
writer . append ( this . hosts . get ( serverIndexCounter ) ) . append ( System . lineSeparator ( ) ) ;
Buggy code:
public class ParentResolver implements IComponentResolver { private static final long serialVersionUID = 1L ; public boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( ( tag instanceof WicketTag ) || ( tag . isAutoComponentTag ( ) ) ) { return false ; } MarkupContainer parent = container ; while ( ( parent != null ) && ( parent . isTransparentResolver ( ) ) ) { parent = parent . getParent ( ) ; if ( parent != null ) { Component component = parent . get ( tag . getId ( ) ) ; if ( component != null ) { <START_BUG> component . render ( markupStream ) ; <END_BUG> return true ; } } } parent = container . getParent ( ) ; if ( parent instanceof IComponentResolver ) { return ( ( IComponentResolver ) ( parent ) ) . resolve ( container , markupStream , tag ) ; } return false ; } }

Fix:
component . render ( ) ;
Buggy code:
public class MapBackedARFFModelTest extends MahoutTestCase { @ Test public void processNominal ( ) { } @ Test public void processBadNumeric ( ) { ARFFModel model = new MapBackedARFFModel ( ) ; model . addLabel ( "b1shkt70694difsmmmdv0ikmoh" , 77 ) ; model . addType ( 77 , REAL ) ; <START_BUG> assertTrue ( ( 0.0 == ( model . getValue ( "b1shkt70694difsmmmdv0ikmoh" , 77 ) ) ) ) ; <END_BUG> } @ Test public void processGoodNumeric ( ) { } }

Fix:
assertTrue ( Double . isNaN ( model . getValue ( "b1shkt70694difsmmmdv0ikmoh" , 77 ) ) ) ;
Buggy code:
class InterfaceImplGenerator { private static final Localizer _loc = Localizer . forPackage ( InterfaceImplGenerator . class ) ; private static final String POSTFIX = "openjpaimpl" ; private final MetaDataRepository _repos ; private final Map _impls = new WeakHashMap ( ) ; private final Project _project = new Project ( ) ; private final BCClassLoader _loader = new BCClassLoader ( _project ) ; private final Project _enhProject = new Project ( ) ; private final BCClassLoader _enhLoader = new BCClassLoader ( _enhProject ) ; public InterfaceImplGenerator ( MetaDataRepository repos ) { } public synchronized Class createImpl ( ClassMetaData meta ) { } private void addField ( BCClass bc , Class iface , FieldMetaData fmd , Set methods ) { } private void invalidateNonBeanMethods ( BCClass bc , Class iface , Set methods ) { } protected final String getClassName ( ClassMetaData meta ) { } private static Method getMethodSafe ( Class iface , String name , Class arg ) { } private static boolean isGetter ( Class iface , FieldMetaData fmd ) { if ( ( ( fmd . getType ( ) ) != ( boolean . class ) ) && ( ( fmd . getType ( ) ) != ( Boolean . class ) ) ) return true ; try { <START_BUG> Method meth = iface . getDeclaredMethod ( ( "is" + ( StringUtils . capitalize ( fmd . getName ( ) ) ) ) , null ) ; <END_BUG> return meth == null ; } catch ( NoSuchMethodException e ) { } return true ; } }

Fix:
Method meth = iface . getDeclaredMethod ( ( "is" + ( StringUtils . capitalize ( fmd . getName ( ) ) ) ) , ( ( Class [ ] ) ( null ) ) ) ;